Merge branch '7c0o-master'

This commit is contained in:
Uwe Kindler 2023-06-19 10:03:56 +02:00
commit 702702cbfd
3 changed files with 13 additions and 1 deletions

View File

@ -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
{

View File

@ -140,6 +140,7 @@ public:
{
LayoutItem->widget()->setParent(nullptr);
}
delete LayoutItem;
m_CurrentWidget = nullptr;
m_CurrentIndex = -1;
}

View File

@ -1133,6 +1133,11 @@ void CFloatingDockContainer::hideAndDeleteLater()
d->AutoHideChildren = false;
hide();
deleteLater();
if (d->DockManager)
{
d->DockManager->removeFloatingWidget(this);
d->DockManager->removeDockContainer(this->dockContainer());
}
}
//============================================================================