X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_PagedContainer.cpp;h=43fb4de2233308b7a25717dea526759092753668;hb=074b1d850036614d4a08999c4bc4e8630db63d2b;hp=d067e100c6132365785787373c2bdb665079a8c7;hpb=ec6aaa4d8bd3609b04ea85683e1b1175b6632238;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_PagedContainer.cpp b/src/ModuleBase/ModuleBase_PagedContainer.cpp index d067e100c..43fb4de22 100644 --- a/src/ModuleBase/ModuleBase_PagedContainer.cpp +++ b/src/ModuleBase/ModuleBase_PagedContainer.cpp @@ -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; }