]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_DataModel.cpp
Salome HOME
[GITHUB #2] problem in export dialog - difference in STEP vs BREP
[modules/shaper.git] / src / XGUI / XGUI_DataModel.cpp
index 270fbe3f37bd557beed02df2a0ab7e110e93c101..7f110ccd2c98e27c8ef5721551a0c883540ab243 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -366,6 +366,16 @@ bool XGUI_DataModel::insertRows(int theRow, int theCount, const QModelIndex& the
 {
   beginInsertRows(theParent, theRow, theRow + theCount - 1);
   endInsertRows();
+  
+  //bos #40645 [CEA] Automatically expand tree in Object Browser
+  if (myWorkshop->objectBrowser()) 
+  {
+    XGUI_DataTree* aTreeView = myWorkshop->objectBrowser()->treeView();
+    if(!aTreeView->isExpanded(theParent))
+    {
+      aTreeView->setExpanded(theParent, true);
+    }
+  }
   return true;
 }