From: vsv Date: Thu, 12 Dec 2019 13:05:19 +0000 (+0300) Subject: Issue #3120: Show Empty panel if selection doesn't contain a shape X-Git-Tag: V9_5_0a1~99 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1035d41ad342fb22f5ea2552a8fc135aed95f3b8;p=modules%2Fshaper.git Issue #3120: Show Empty panel if selection doesn't contain a shape --- diff --git a/src/XGUI/XGUI_InspectionPanel.cpp b/src/XGUI/XGUI_InspectionPanel.cpp index 95ae953a1..2f2788f76 100644 --- a/src/XGUI/XGUI_InspectionPanel.cpp +++ b/src/XGUI/XGUI_InspectionPanel.cpp @@ -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(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));