activateCustom();
}
+void ModuleBase_ModelWidget::setDefaultValue(const std::string& theValue)
+{
+ myDefaultValue = theValue;
+}
+
bool ModuleBase_ModelWidget::storeValue()
{
emit beforeValuesChanged();
void focusOutWidget(ModuleBase_ModelWidget* theWidget);
protected:
+ /// Sets default value of widget. Nornaly, widget should fetch this value
+ /// from the xml. However, some widgets derived widgets could define it
+ void setDefaultValue(const std::string& theValue);
/// \brief Set the attribute name
/// \param theAttribute the string value with attribute name
void setAttributeID(const std::string& theAttribute)
int ModuleBase_PagedContainer::addPage(ModuleBase_PageBase* thePage,
const QString& theName, const QString& theCaseId)
{
+ if (!myPages.count()) {
+ setDefaultValue(theCaseId.toStdString());
+ }
myCaseIds << theCaseId;
myPages << thePage;
- storeValueCustom(); // to store the initial state
+
return myPages.count();
}