]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Process parts activation method
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 8 Sep 2014 14:17:49 +0000 (18:17 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 8 Sep 2014 14:17:49 +0000 (18:17 +0400)
src/XGUI/XGUI_PartDataModel.cpp
src/XGUI/XGUI_Workshop.cpp

index 16adcadf747f9e3fbfcf66828a8913dae2443fa9..6a5ffdc9630f705ebb68b740bcd1619990824a6d 100644 (file)
@@ -333,7 +333,13 @@ int XGUI_PartDataModel::rowCount(const QModelIndex& parent) const
   }
   switch (parent.internalId()) {
     case MyRoot:
-      return 3 + partDocument()->size(ModelAPI_Feature::group());
+      {
+        DocumentPtr aDoc = partDocument();
+        if (aDoc)
+          return 3 + aDoc->size(ModelAPI_Feature::group());
+        else 
+          return 0;
+      }
     case ParamsFolder:
       return partDocument()->size(ModelAPI_ResultParameters::group());
     case ConstructFolder:
index 9d51cd86584a90175da8428851aa23bd1e74b3db..76407ea44eb8e0e7063cf0a27f4fcf4293b56d9d 100644 (file)
@@ -988,6 +988,8 @@ void XGUI_Workshop::onWidgetValuesChanged()
 //**************************************************************
 void XGUI_Workshop::activatePart(ResultPartPtr theFeature)
 {
+  if (theFeature)
+    theFeature->activate();
   changeCurrentDocument(theFeature);
   myObjectBrowser->activatePart(theFeature);
 }