From 59f891f6ab907ca79ff8dcd9c03c06ff0fe86402 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 17 Sep 2015 12:36:54 +0300 Subject: [PATCH] Issue #924 Fatal error as result of ExtrusionCut call An attempt to delete widgets. --- src/ModuleBase/ModuleBase_PageBase.cpp | 5 +++-- src/XGUI/XGUI_PropertyPanel.cpp | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ModuleBase/ModuleBase_PageBase.cpp b/src/ModuleBase/ModuleBase_PageBase.cpp index f7057783e..ed9fb7694 100644 --- a/src/ModuleBase/ModuleBase_PageBase.cpp +++ b/src/ModuleBase/ModuleBase_PageBase.cpp @@ -40,10 +40,12 @@ void ModuleBase_PageBase::addPageWidget(ModuleBase_PageBase* thePage) void ModuleBase_PageBase::clearPage() { + myWidgetList.clear(); + QLayoutItem *aChild; while ((aChild = pageLayout()->takeAt(0)) != 0) { if(aChild->widget()) { - aChild->widget()->deleteLater(); + delete aChild->widget(); } else { delete aChild; } @@ -62,7 +64,6 @@ void ModuleBase_PageBase::clearPage() for( int i=0; isetRowStretch( i, 0 ); } - myWidgetList.clear(); } diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 1b5a64aa5..89b9461f5 100644 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -96,8 +96,6 @@ void XGUI_PropertyPanel::cleanContent() QWidget* aWidget = *anIt; if (aWidget) { aWidget->blockSignals(true); - aWidget->setParent(0); - aWidget->deleteLater(); } } -- 2.39.2