From: nds Date: Wed, 13 Jul 2016 09:10:05 +0000 (+0300) Subject: #1659 New widget for supporting optional inputs X-Git-Tag: V_2.5.0~198 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9c3cfc156b10e329d0be1792fac95212128566e6;p=modules%2Fshaper.git #1659 New widget for supporting optional inputs --- diff --git a/src/ModuleBase/ModuleBase_WidgetCheckGroupBox.cpp b/src/ModuleBase/ModuleBase_WidgetCheckGroupBox.cpp index 4a233ee2d..05f202306 100755 --- a/src/ModuleBase/ModuleBase_WidgetCheckGroupBox.cpp +++ b/src/ModuleBase/ModuleBase_WidgetCheckGroupBox.cpp @@ -63,7 +63,7 @@ QList ModuleBase_WidgetCheckGroupBox::getControls() const void ModuleBase_WidgetCheckGroupBox::onPageClicked() { storeValue(); - updatePagesVisibility(); + updateControlsVisibility(); } void ModuleBase_WidgetCheckGroupBox::addPageStretch() @@ -85,7 +85,7 @@ void ModuleBase_WidgetCheckGroupBox::placeModelWidget(ModuleBase_ModelWidget* th ModuleBase_ModelWidget* aCheckBoxWidget = myCheckBoxWidget; myCheckBoxWidget = 0; - if (aCheckBoxWidget) + if (aCheckBoxWidget) // move the model widget from check box frame to group box frame placeModelWidget(aCheckBoxWidget); const int kCol = 0; @@ -102,9 +102,9 @@ void ModuleBase_WidgetCheckGroupBox::placeWidget(QWidget* theWidget) { createControl(GroupBox); setOptionType(GroupBox); - if (isCheckBoxFilled()) { + if (isCheckBoxFilled()) placeModelWidget(myCheckBoxWidget); - } + if (!theWidget) { #ifdef _DEBUG @@ -212,10 +212,10 @@ void ModuleBase_WidgetCheckGroupBox::setCurrentValue(const bool& theValue) myCheckBox->setChecked(theValue); myCheckBox->blockSignals(isBlocked); } - updatePagesVisibility(); + updateControlsVisibility(); } -void ModuleBase_WidgetCheckGroupBox::updatePagesVisibility() +void ModuleBase_WidgetCheckGroupBox::updateControlsVisibility() { if (myOptionType == GroupBox) { bool aChecked = myGroupBox->isChecked();