Salome HOME
WidgetMultiSelector preparation to use ModelAPI_AttributeRefAttrList.
[modules/shaper.git] / src / ModuleBase / ModuleBase_PageBase.cpp
index f7057783e2633f072be18742f01f11fdd0b6f77f..ed9fb7694031d374eb4120e8ee216a60a9afe5bd 100644 (file)
@@ -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; i<r; i++ )
       aLayout->setRowStretch( i, 0 );
   }
-  myWidgetList.clear();
 }