From 1035d41ad342fb22f5ea2552a8fc135aed95f3b8 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 12 Dec 2019 16:05:19 +0300 Subject: [PATCH] Issue #3120: Show Empty panel if selection doesn't contain a shape --- src/XGUI/XGUI_InspectionPanel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)); -- 2.39.2