X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_PageWidget.cpp;h=135fe23b78b0e9de603917de390e4df36cd0d202;hb=1490e92974d2c0bdcdbecd6fa9388e31dccfa363;hp=d3039cac5b12dcb8988409d01083463fc4bf62a3;hpb=694482299ca580d780c221cc6a3e7574e59fd2c3;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_PageWidget.cpp b/src/ModuleBase/ModuleBase_PageWidget.cpp index d3039cac5..135fe23b7 100644 --- a/src/ModuleBase/ModuleBase_PageWidget.cpp +++ b/src/ModuleBase/ModuleBase_PageWidget.cpp @@ -11,6 +11,8 @@ #include +#include + ModuleBase_PageWidget::ModuleBase_PageWidget(QWidget* theParent) : QFrame(theParent) { @@ -36,10 +38,9 @@ void ModuleBase_PageWidget::placeModelWidget(ModuleBase_ModelWidget* theWidget) myMainLayout->setRowStretch(kRow, 0); } -void ModuleBase_PageWidget::placePageWidget(ModuleBase_PageBase* theWidget) +void ModuleBase_PageWidget::placeWidget(QWidget* theWidget) { - QWidget* aWidget = dynamic_cast(theWidget); - if (!aWidget) { + if (!theWidget) { #ifdef _DEBUG std::cout << "ModuleBase_PageWidget::placePageWidget: can not cast page" << std::endl; #endif @@ -47,7 +48,7 @@ void ModuleBase_PageWidget::placePageWidget(ModuleBase_PageBase* theWidget) } const int kCol = 0; const int kRow = myMainLayout->count(); - myMainLayout->addWidget(aWidget, kRow, kCol); + myMainLayout->addWidget(theWidget, kRow, kCol); myMainLayout->setRowStretch(kRow, 0); }