1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-03-14 18:19:52 +08:00

Fixed showing of unassigned dock widgets

This commit is contained in:
Uwe Kindler 2018-11-07 14:34:49 +01:00
parent 6843703484
commit 316e5324ad
2 changed files with 12 additions and 0 deletions

View File

@ -459,6 +459,10 @@ void CDockWidget::toggleViewInternal(bool Open)
CDockWidget::emitTopLevelEventForWidget(TopLevelDockWidgetBefore, false);
}
// Here we need to call the dockContainer() function again, because if
// this dock widget was unassigned before the call to showDockWidget() then
// it has a dock container now
DockContainer = dockContainer();
CDockWidget* TopLevelDockWidgetAfter = DockContainer
? DockContainer->topLevelDockWidget() : nullptr;
CDockWidget::emitTopLevelEventForWidget(TopLevelDockWidgetAfter, true);

View File

@ -37,6 +37,7 @@
#include <QAction>
#include <QDebug>
#include <QAbstractButton>
#include <QElapsedTimer>
#include "DockContainerWidget.h"
#include "DockAreaWidget.h"
@ -44,6 +45,7 @@
#include "DockWidget.h"
#include "DockOverlay.h"
#include <iostream>
namespace ads
{
@ -148,6 +150,10 @@ void FloatingDockContainerPrivate::titleMouseReleaseEvent()
//============================================================================
void FloatingDockContainerPrivate::updateDropOverlays(const QPoint& GlobalPos)
{
static QElapsedTimer MsSinceLastCallTimer;
QElapsedTimer PerformanceTimer;
PerformanceTimer.start();
if (!_this->isVisible() || !DockManager)
{
return;
@ -219,6 +225,8 @@ void FloatingDockContainerPrivate::updateDropOverlays(const QPoint& GlobalPos)
{
DockAreaOverlay->hideOverlay();
}
std::cout << "updateDropOverlays us: " << PerformanceTimer.nsecsElapsed() / 1000 << std::endl;
}