From: sbh Date: Tue, 3 Mar 2015 10:31:55 +0000 (+0300) Subject: Correction for boolean control after refactoring X-Git-Tag: V_1.1.0~151 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=41d9bb4384129164d128e43a6614da5269f905ec;p=modules%2Fshaper.git Correction for boolean control after refactoring --- diff --git a/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp b/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp index f1d5f2ba0..7d5e2855b 100644 --- a/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp @@ -5,6 +5,7 @@ // Author: Vitaly Smetannikov #include +#include #include #include @@ -28,10 +29,15 @@ ModuleBase_WidgetBoolValue::ModuleBase_WidgetBoolValue(QWidget* theParent, QString aToolTip = QString::fromStdString(theData->widgetTooltip()); bool isChecked = theData->getBooleanAttribute(ATTR_DEFAULT, false); - myCheckBox = new QCheckBox(aText, theParent); + myCheckBox = new QCheckBox(aText, this); myCheckBox->setToolTip(aToolTip); myCheckBox->setChecked(isChecked); + QVBoxLayout* aMainLayout = new QVBoxLayout(this); + ModuleBase_Tools::adjustMargins(aMainLayout); + aMainLayout->addWidget(myCheckBox); + setLayout(aMainLayout); + connect(myCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(valuesChanged())); }