From 41d9bb4384129164d128e43a6614da5269f905ec Mon Sep 17 00:00:00 2001 From: sbh Date: Tue, 3 Mar 2015 13:31:55 +0300 Subject: [PATCH] Correction for boolean control after refactoring --- src/ModuleBase/ModuleBase_WidgetBoolValue.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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())); } -- 2.39.2