X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_PageGroupBox.cpp;h=69e4052e9cb5c49faf383f6197ac6fde1ad06e69;hb=db0bda841e8d70e188a800f3a662d259246d4a20;hp=f16e4d728b2ef247f4afeaf3140dad314b8003bf;hpb=31e91a8d11e03ddce87e8c2aa04695961a266a97;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_PageGroupBox.cpp b/src/ModuleBase/ModuleBase_PageGroupBox.cpp index f16e4d728..69e4052e9 100644 --- a/src/ModuleBase/ModuleBase_PageGroupBox.cpp +++ b/src/ModuleBase/ModuleBase_PageGroupBox.cpp @@ -1,9 +1,21 @@ -/* - * ModuleBase_PageGroupBox.cpp - * - * Created on: Mar 4, 2015 - * Author: sbh - */ +// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include #include @@ -31,13 +43,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(theWidget); - if (!aWidget) { + if (!theWidget) { #ifdef _DEBUG std::cout << "ModuleBase_PageGroupBox::placePageWidget: can not cast page" << std::endl; #endif @@ -45,7 +61,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()