Salome HOME
Update viewer on delete an item
[modules/shaper.git] / src / XGUI / XGUI_InspectionPanel.cpp
index 8764568f800b05971645ff8d028bbfa821c3a554..6d615ac06dbe53dce38181ce38f964017dc631b9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include "XGUI_InspectionPanel.h"
@@ -25,6 +24,7 @@
 
 #include <ModuleBase_ViewerPrs.h>
 #include <ModuleBase_Tools.h>
+#include <ModelAPI_ResultField.h>
 
 #include <ModelAPI_Result.h>
 
@@ -138,8 +138,8 @@ XGUI_InspectionPanel::XGUI_InspectionPanel(QWidget* theParent, XGUI_SelectionMgr
   mySubShapesTab->setHorizontalHeaderLabels(aTitles);
 
   QStringList aSubShapes;
-  aSubShapes << "SHAPE" << "COMPOUND" << "COMPSOLID" <<
-    "SOLID" << "SHELL" << "FACE" << "WIRE" << "EDGE" << "VERTEX";
+  aSubShapes << tr("SHAPE") << tr("COMPOUND") << tr("COMPSOLID") <<
+    tr("SOLID") << tr("SHELL") << tr("FACE") << tr("WIRE") << tr("EDGE") << tr("VERTEX");
   int i = 0;
   foreach(QString aType, aSubShapes) {
     QTableWidgetItem* aItem = new QTableWidgetItem(aType);
@@ -155,9 +155,6 @@ XGUI_InspectionPanel::XGUI_InspectionPanel(QWidget* theParent, XGUI_SelectionMgr
   mySubShapesTab->setColumnWidth(0, 90);
   mySubShapesTab->setColumnWidth(1, 70);
 
-  //mySubShapesTab->setMaximumWidth(170);
-  //mySubShapesTab->setMinimumHeight(300);
-
   aSplitter->addWidget(mySubShapesTab);
 
   // Type of object
@@ -229,6 +226,10 @@ void XGUI_InspectionPanel::onSelectionChanged()
 
   if (aSelectedList.count() > 0) {
     ModuleBase_ViewerPrsPtr aPrs = aSelectedList.first();
+    FieldStepPtr aStep =
+      std::dynamic_pointer_cast<ModelAPI_ResultField::ModelAPI_FieldStep>(aPrs->object());
+    if (aStep)
+      return;
     TopoDS_Shape aShape = ModuleBase_Tools::getSelectedShape(aPrs);
     if (aShape.IsNull()) {
       ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs->object());