Salome HOME
using a better solution to do compare doubles for shape physical properties
[modules/shaper.git] / src / XGUI / XGUI_DataModel.cpp
index 9c7fde64fd5744b0fdfc9e1ba5cbc85ec411a098..7f110ccd2c98e27c8ef5721551a0c883540ab243 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2023  CEA, EDF
+// 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;
 }