Skip to content

Commit 702702c

Browse files
Merge branch '7c0o-master'
2 parents 0bfee09 + c552fef commit 702702c

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/DockAreaTabBar.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <QBoxLayout>
3737
#include <QApplication>
3838
#include <QtGlobal>
39+
#include <QTimer>
3940

4041
#include "FloatingDockContainer.h"
4142
#include "DockAreaWidget.h"
@@ -107,7 +108,12 @@ void DockAreaTabBarPrivate::updateTabs()
107108
{
108109
TabWidget->show();
109110
TabWidget->setActiveTab(true);
110-
_this->ensureWidgetVisible(TabWidget);
111+
// Sometimes the synchronous calculation of the rectangular area fails
112+
// Therefore we use QTimer::singleShot here to execute the call
113+
// within the event loop - see #520
114+
QTimer::singleShot(0, [&, TabWidget]{
115+
_this->ensureWidgetVisible(TabWidget);
116+
});
111117
}
112118
else
113119
{

src/DockAreaWidget.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ class CDockAreaLayout
140140
{
141141
LayoutItem->widget()->setParent(nullptr);
142142
}
143+
delete LayoutItem;
143144
m_CurrentWidget = nullptr;
144145
m_CurrentIndex = -1;
145146
}

src/FloatingDockContainer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,11 @@ void CFloatingDockContainer::hideAndDeleteLater()
11331133
d->AutoHideChildren = false;
11341134
hide();
11351135
deleteLater();
1136+
if (d->DockManager)
1137+
{
1138+
d->DockManager->removeFloatingWidget(this);
1139+
d->DockManager->removeDockContainer(this->dockContainer());
1140+
}
11361141
}
11371142

11381143
//============================================================================

0 commit comments

Comments
 (0)