]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1433: Selection synchronization
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 29 Apr 2016 13:52:34 +0000 (16:52 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 29 Apr 2016 13:52:47 +0000 (16:52 +0300)
src/Config/dataModel.xml
src/XGUI/XGUI_SelectionMgr.cpp

index c9742ab12c5ab9ba7012402d98e698529455ae7b..783b7b0e161a2844d100eeb5ced71b9cbadd6033 100644 (file)
@@ -11,6 +11,6 @@
                 folder_features="ParametersMgr"/>
         <folder name="Constructions" group_type="Construction" icon=":pictures/constr_folder.png"/>
         <folder name="Groups" group_type="Groups" icon=":pictures/constr_folder.png" show_empty="false"/>
-        <folder name="Bodies" group_type="Bodies" icon=":pictures/constr_folder.png"/>
+        <folder name="Results" group_type="Bodies" icon=":pictures/constr_folder.png"/>
     </sub_document>
 </data_model>
\ No newline at end of file
index 8e614e30b0a0be71a9e36d1e1686b9f30a522e56..8bc012412bb24d5698abd829cfc058d8c4b1709a 100755 (executable)
@@ -113,15 +113,15 @@ void XGUI_SelectionMgr::onObjectBrowserSelection()
         std::list<ResultPtr>::const_iterator aIt;
         for (aIt = aResList.cbegin(); aIt != aResList.cend(); ++aIt) {
           aResult = (*aIt);
+          aSelectedPrs.append(std::shared_ptr<ModuleBase_ViewerPrs>(
+            new ModuleBase_ViewerPrs(aResult, GeomShapePtr(), NULL)));
           aCompSolid = std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aResult);
           if (aCompSolid.get()) {
             for (int i = 0; i < aCompSolid->numberOfSubs(); i++) {
+              ResultBodyPtr aResult = aCompSolid->subResult(i);
               aSelectedPrs.append(std::shared_ptr<ModuleBase_ViewerPrs>(
-                   new ModuleBase_ViewerPrs(aCompSolid->subResult(i), GeomShapePtr(), NULL)));
+                new ModuleBase_ViewerPrs(aResult, aResult->shape(), NULL)));
             }
-          } else {
-            aSelectedPrs.append(std::shared_ptr<ModuleBase_ViewerPrs>(
-                 new ModuleBase_ViewerPrs(aResult, GeomShapePtr(), NULL)));
           }
         }
       }