Reverted changes that cause application crash

This commit is contained in:
Uwe Kindler 2020-08-24 13:22:34 +02:00
parent 703a9b3e12
commit c28a27c81c
2 changed files with 3 additions and 26 deletions

View File

@ -86,18 +86,6 @@ public:
}
/**
* Delete widgets without parents in this layout
*/
~CDockAreaLayout()
{
for(auto Widget : m_Widgets)
{
if(!Widget->parent())
delete Widget;
}
}
/**
* Returns the number of widgets in this layout
*/
@ -977,7 +965,9 @@ QSize CDockAreaWidget::minimumSizeHint() const
void CDockAreaWidget::onDockWidgetFeaturesChanged()
{
if (d->TitleBar)
{
d->updateTitleBarButtonStates();
}
}

View File

@ -484,12 +484,6 @@ CDockManager::~CDockManager()
{
delete FloatingWidget;
}
auto DockWidgetsMap = d->DockWidgetsMap;
for(auto DockWidget : d->DockWidgetsMap)
{
if(!DockWidget->parent())
delete DockWidget;
}
delete d;
}
@ -659,14 +653,7 @@ void CDockManager::showEvent(QShowEvent *event)
for (auto FloatingWidget : d->UninitializedFloatingWidgets)
{
for(CDockWidget* DockWidget : FloatingWidget->dockWidgets())
{
if(!DockWidget->isClosed())
{
FloatingWidget->show();
break;
}
}
FloatingWidget->show();
}
d->UninitializedFloatingWidgets.clear();
}