Salome HOME
Hide selected object on using it in extrusion
[modules/shaper.git] / src / XGUI / XGUI_MenuGroupPanel.cpp
index 8d5d24b2146206e706922eff835521861c478797..30c459466e9eaa44c303d1c28ce09bc40501270c 100644 (file)
 #include <iostream>
 
 XGUI_MenuGroupPanel::XGUI_MenuGroupPanel(QWidget *parent)
-    : QWidget(parent), myNewRow(0), myNewCol(0), myMaxRow(1)
+    : QFrame(parent),
+      myNewRow(0),
+      myNewCol(0),
+      myMaxRow(1)
 {
   myLayout = new QGridLayout(this);
   myLayout->setSpacing(0);
   myLayout->setMargin(0);
   myLayout->setContentsMargins(0, 0, 0, 0);
+  setFrameShape(QFrame::NoFrame);
 }
 
 void XGUI_MenuGroupPanel::addCommand(XGUI_Command* theAction)
@@ -56,10 +60,11 @@ void XGUI_MenuGroupPanel::resizeEvent(QResizeEvent* theEvent)
   myMaxRow = aMaxRow;
   myNewRow = 0;
   myNewCol = 0;
-  foreach(QWidget* eachWidget, myActionWidget) {
+  foreach(QWidget* eachWidget, myActionWidget)
+  {
     placeWidget(eachWidget);
   }
-  myLayout->setRowStretch(myMaxRow + 1,  1);
+  myLayout->setRowStretch(myMaxRow + 1, 1);
 }
 
 XGUI_Command* XGUI_MenuGroupPanel::addFeature(const QString& theId, const QString& theTitle,
@@ -68,17 +73,17 @@ XGUI_Command* XGUI_MenuGroupPanel::addFeature(const QString& theId, const QStrin
 {
   XGUI_Command* aCommand = new XGUI_Command(theId, theIcon, theTitle, this, isCheckable);
   aCommand->setToolTip(theTip);
-  if (!theKeys.isEmpty())
+  if (!theKeys.isEmpty()) {
     aCommand->setShortcut(theKeys);
-
+  }
   addCommand(aCommand);
   return aCommand;
 }
 
-
 XGUI_Command* XGUI_MenuGroupPanel::feature(const QString& theId) const
 {
-  foreach (XGUI_Command* aCmd, myActions) {
+  foreach (XGUI_Command* aCmd, myActions)
+  {
     if (aCmd->data().toString() == theId)
       return aCmd;
   }