Salome HOME
Issue #1834: Fix length of lines
[modules/shaper.git] / src / ModuleBase / ModuleBase_PageGroupBox.cpp
index f16e4d728b2ef247f4afeaf3140dad314b8003bf..3619d1464574982b0177ca5bf65e440ead7d4816 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
 /*
  * ModuleBase_PageGroupBox.cpp
  *
@@ -31,13 +32,17 @@ void ModuleBase_PageGroupBox::placeModelWidget(ModuleBase_ModelWidget* theWidget
 {
   const int kCol = 0;
   const int kRow = myMainLayout->count();
-  myMainLayout->addWidget(theWidget, kRow, kCol, Qt::AlignTop | Qt::AlignLeft);
+  // it seems, that the align on left is not necessary here, but leads to widgets, which are
+  // not extended on full width of the parent page. The case is grouped widgets in
+  // the sketch translation operation
+  myMainLayout->addWidget(theWidget, kRow, kCol, Qt::AlignTop);// | Qt::AlignLeft);
+  myMainLayout->setRowStretch(kRow, 0);
+
 }
 
-void ModuleBase_PageGroupBox::placePageWidget(ModuleBase_PageBase* theWidget)
+void ModuleBase_PageGroupBox::placeWidget(QWidget* theWidget)
 {
-  QWidget* aWidget = dynamic_cast<QWidget*>(theWidget);
-  if (!aWidget) {
+  if (!theWidget) {
     #ifdef _DEBUG
     std::cout << "ModuleBase_PageGroupBox::placePageWidget: can not cast page" << std::endl;
     #endif
@@ -45,7 +50,8 @@ void ModuleBase_PageGroupBox::placePageWidget(ModuleBase_PageBase* theWidget)
   }
   const int kCol = 0;
   const int kRow = myMainLayout->count();
-  myMainLayout->addWidget(aWidget, kRow, kCol, Qt::AlignTop | Qt::AlignLeft);
+  myMainLayout->addWidget(theWidget, kRow, kCol);
+  myMainLayout->setRowStretch(kRow, 0);
 }
 
 QLayout* ModuleBase_PageGroupBox::pageLayout()