Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / XGUI / XGUI_ObjectsBrowser.cpp
index 0f82445343ffe3cb6309731bd2b29cddb6efe98a..2ff582bb7c70b08fa7024558839f717aa2a8eca3 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
 #include "XGUI_ObjectsBrowser.h"
 #include "XGUI_DocumentDataModel.h"
 #include "XGUI_Tools.h"
@@ -7,6 +9,8 @@
 #include <ModelAPI_Document.h>
 #include <ModelAPI_Object.h>
 
+#include <ModuleBase_Tools.h>
+
 #include <QLayout>
 #include <QLabel>
 #include <QLineEdit>
@@ -78,7 +82,7 @@ void XGUI_DataTree::commitData(QWidget* theEditor)
     QString aRes = aEditor->text();
     ObjectPtr aFeature = mySelectedData.first();
     SessionPtr aMgr = ModelAPI_Session::get();
-    aMgr->startOperation();
+    aMgr->startOperation("Rename");
     aFeature->data()->setName(qPrintable(aRes));
     aMgr->finishOperation();
   }
@@ -99,7 +103,7 @@ XGUI_ObjectsBrowser::XGUI_ObjectsBrowser(QWidget* theParent)
     : QWidget(theParent)
 {
   QVBoxLayout* aLayout = new QVBoxLayout(this);
-  aLayout->setContentsMargins(0, 0, 0, 0);
+  ModuleBase_Tools::zeroMargins(aLayout);
   aLayout->setSpacing(0);
 
   QFrame* aLabelWgt = new QFrame(this);
@@ -110,7 +114,7 @@ XGUI_ObjectsBrowser::XGUI_ObjectsBrowser(QWidget* theParent)
 
   aLayout->addWidget(aLabelWgt);
   QHBoxLayout* aLabelLay = new QHBoxLayout(aLabelWgt);
-  aLabelLay->setContentsMargins(0, 0, 0, 0);
+  ModuleBase_Tools::zeroMargins(aLabelLay);
   aLabelLay->setSpacing(0);
 
   QLabel* aLbl = new QLabel(aLabelWgt);
@@ -336,7 +340,7 @@ void XGUI_ObjectsBrowser::rebuildDataTree()
 }
 
 //***************************************************
-void XGUI_ObjectsBrowser::setObjectsSelected(const QList<ObjectPtr>& theObjects)
+void XGUI_ObjectsBrowser::setObjectsSelected(const QObjectPtrList& theObjects)
 {
   QList<QModelIndex> theIndexes;
   QItemSelectionModel* aSelectModel = myTreeView->selectionModel();