Salome HOME
Issue #1330 selection lost correction: rectangle, fillet, select a point(the line...
[modules/shaper.git] / src / ModuleBase / ModuleBase_PagedContainer.cpp
index 29cdd56eaa51dad616f853ad54df83d0c82f5386..9f32442a577901139b5a810492c2828dc1195cd1 100644 (file)
@@ -13,7 +13,7 @@
 #include <ModelAPI_AttributeString.h>
 
 #include <QWidget>
-#include <Qlist>
+#include <QList>
 #include <QVBoxLayout>
 
 
@@ -22,6 +22,9 @@ ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent, const C
 : ModuleBase_ModelWidget(theParent, theData, theParentId),
   myIsFocusOnCurrentPage(false)
 {
+  // it is not obligatory to be ignored when property panel tries to activate next active widget
+  // but if focus is moved to this control, it can accept it.
+  myIsObligatory = false;
 }
 
 ModuleBase_PagedContainer::~ModuleBase_PagedContainer()
@@ -29,11 +32,15 @@ ModuleBase_PagedContainer::~ModuleBase_PagedContainer()
 }
 
 int ModuleBase_PagedContainer::addPage(ModuleBase_PageBase* thePage,
-                                      const QString& theName, const QString& theCaseId)
+                                      const QString& theName, const QString& theCaseId,
+                                      const QPixmap& theIcon )
 {
+  if (!myPages.count()) {
+    setDefaultValue(theCaseId.toStdString());
+  }
   myCaseIds << theCaseId;
   myPages << thePage;
-  storeValueCustom(); // to store the initial state
+
   return myPages.count();
 }
 
@@ -66,7 +73,7 @@ void ModuleBase_PagedContainer::enableFocusProcessing()
   myIsFocusOnCurrentPage = true;
 }
 
-bool ModuleBase_PagedContainer::restoreValue()
+bool ModuleBase_PagedContainer::restoreValueCustom()
 {
   // A rare case when plugin was not loaded.
   if(!myFeature)