]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3120: Show Empty panel if selection doesn't contain a shape
authorvsv <vsv@opencascade.com>
Thu, 12 Dec 2019 13:05:19 +0000 (16:05 +0300)
committervsv <vsv@opencascade.com>
Thu, 12 Dec 2019 13:05:37 +0000 (16:05 +0300)
src/XGUI/XGUI_InspectionPanel.cpp

index 95ae953a1bbe81cdc0dee04e8904c31ae4a4382d..2f2788f762d8e356ce8254e9d644f9a6838fb895 100644 (file)
@@ -263,7 +263,6 @@ void XGUI_InspectionPanel::onSelectionChanged()
       buildFeaturePane(aFeature);
     }
     else {
-      myStackWgt->setCurrentIndex(myShapePanelId);
       TopoDS_Shape aShape = ModuleBase_Tools::getSelectedShape(aPrs);
       if (aShape.IsNull()) {
         ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs->object());
@@ -274,8 +273,11 @@ void XGUI_InspectionPanel::onSelectionChanged()
           }
         }
       }
-      if (aShape.IsNull())
+      if (aShape.IsNull()) {
+        myStackWgt->setCurrentIndex(myFeaturePanelId);
         return;
+      }
+      myStackWgt->setCurrentIndex(myShapePanelId);
       GeomShapePtr aShapePtr(new GeomAPI_Shape());
       aShapePtr->setImpl(new TopoDS_Shape(aShape));