Salome HOME
Issue #412: Crash on delete sketch line with constraints
[modules/shaper.git] / src / ModuleBase / ModuleBase_PagedContainer.cpp
index d067e100c6132365785787373c2bdb665079a8c7..43fb4de2233308b7a25717dea526759092753668 100644 (file)
@@ -31,8 +31,12 @@ ModuleBase_PagedContainer::~ModuleBase_PagedContainer()
 int ModuleBase_PagedContainer::addPage(ModuleBase_PageBase* thePage,
                                       const QString& theName, const QString& theCaseId)
 {
+  if (!myPages.count()) {
+    setDefaultValue(theCaseId.toStdString());
+  }
   myCaseIds << theCaseId;
   myPages << thePage;
+
   return myPages.count();
 }
 
@@ -95,6 +99,7 @@ bool ModuleBase_PagedContainer::storeValueCustom() const
   AttributeStringPtr aStringAttr = aData->string(attributeID());
   QString aWidgetValue = myCaseIds.at(currentPageIndex());
   aStringAttr->setValue(aWidgetValue.toStdString());
+  updateObject(myFeature); // for preview
   return true;
 }