mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 23:51:33 +08:00
Merge branch '7c0o-master'
This commit is contained in:
commit
702702cbfd
@ -36,6 +36,7 @@
|
||||
#include <QBoxLayout>
|
||||
#include <QApplication>
|
||||
#include <QtGlobal>
|
||||
#include <QTimer>
|
||||
|
||||
#include "FloatingDockContainer.h"
|
||||
#include "DockAreaWidget.h"
|
||||
@ -107,7 +108,12 @@ void DockAreaTabBarPrivate::updateTabs()
|
||||
{
|
||||
TabWidget->show();
|
||||
TabWidget->setActiveTab(true);
|
||||
_this->ensureWidgetVisible(TabWidget);
|
||||
// Sometimes the synchronous calculation of the rectangular area fails
|
||||
// Therefore we use QTimer::singleShot here to execute the call
|
||||
// within the event loop - see #520
|
||||
QTimer::singleShot(0, [&, TabWidget]{
|
||||
_this->ensureWidgetVisible(TabWidget);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -140,6 +140,7 @@ public:
|
||||
{
|
||||
LayoutItem->widget()->setParent(nullptr);
|
||||
}
|
||||
delete LayoutItem;
|
||||
m_CurrentWidget = nullptr;
|
||||
m_CurrentIndex = -1;
|
||||
}
|
||||
|
@ -1133,6 +1133,11 @@ void CFloatingDockContainer::hideAndDeleteLater()
|
||||
d->AutoHideChildren = false;
|
||||
hide();
|
||||
deleteLater();
|
||||
if (d->DockManager)
|
||||
{
|
||||
d->DockManager->removeFloatingWidget(this);
|
||||
d->DockManager->removeDockContainer(this->dockContainer());
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user