Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / XGUI / XGUI_Workbench.cpp
index 468d8d0ce1f1fdfa4732aedf1243355e605bcca2..8826b335f576318696b0426e5f8526a1083b487e 100644 (file)
@@ -8,15 +8,15 @@
 #define SCROLL_STEP 20
 
 //**************************************************
-class CommandsArea: public QScrollArea
+class CommandsArea : public QScrollArea
 {
-public:
+ public:
   CommandsArea(QWidget* theParent)
       : QScrollArea(theParent)
   {
   }
 
-protected:
+ protected:
   virtual void resizeEvent(QResizeEvent * theEvent);
 };
 
@@ -84,7 +84,9 @@ XGUI_MenuGroupPanel* XGUI_Workbench::addGroup(const QString& theId)
   XGUI_MenuGroupPanel* aGroup = new XGUI_MenuGroupPanel(myChildWidget);
   aGroup->setObjectName(theId);
   myLayout->addWidget(aGroup);
-  addSeparator();
+  if (theId != "Default") {
+    addSeparator();
+  }
   myLayout->addStretch();
   myGroups.append(aGroup);
   return aGroup;
@@ -186,8 +188,9 @@ XGUI_Command* XGUI_Workbench::feature(const QString& theId) const
 QList<XGUI_Command*> XGUI_Workbench::features() const
 {
   QList<XGUI_Command*> aList;
-  QList<XGUI_MenuGroupPanel*>::const_iterator aIt;
-  for (aIt = myGroups.constBegin(); aIt != myGroups.constEnd(); ++aIt) 
-    aList.append((*aIt)->features());
+  foreach (XGUI_MenuGroupPanel* aGroup, myGroups)
+  {
+    aList.append(aGroup->features());
+  }
   return aList;
-}
\ No newline at end of file
+}