From fde4cfdd9e680a86bc5181abc5d90b2cebbdd6e1 Mon Sep 17 00:00:00 2001 From: Gennady Pospelov <g.pospelov@fz-juelich.de> Date: Fri, 13 Feb 2015 13:14:07 +0100 Subject: [PATCH] Cleanup in UniversalPropertyEditor --- .../IntensityDataPropertyWidget.cpp | 2 +- .../PropertyEditor/UniversalPropertyEditor.cpp | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/GUI/coregui/Views/IntensityDataWidgets/IntensityDataPropertyWidget.cpp b/GUI/coregui/Views/IntensityDataWidgets/IntensityDataPropertyWidget.cpp index 335c65c2321..885c3ce7c05 100644 --- a/GUI/coregui/Views/IntensityDataWidgets/IntensityDataPropertyWidget.cpp +++ b/GUI/coregui/Views/IntensityDataWidgets/IntensityDataPropertyWidget.cpp @@ -34,7 +34,7 @@ IntensityDataPropertyWidget::IntensityDataPropertyWidget(QWidget *parent) mainLayout->setMargin(0); mainLayout->setSpacing(0); - m_propertyEditor = new UniversalPropertyEditor(0, this, UniversalPropertyEditor::BROWSER_GROUPBOX_TYPE); + m_propertyEditor = new UniversalPropertyEditor(0, this); //m_propertyEditor->setCreateGroupProperty(false); mainLayout->addWidget(m_propertyEditor); diff --git a/GUI/coregui/Views/PropertyEditor/UniversalPropertyEditor.cpp b/GUI/coregui/Views/PropertyEditor/UniversalPropertyEditor.cpp index fff6ce161b2..1c9b332c35b 100644 --- a/GUI/coregui/Views/PropertyEditor/UniversalPropertyEditor.cpp +++ b/GUI/coregui/Views/PropertyEditor/UniversalPropertyEditor.cpp @@ -209,7 +209,6 @@ void UniversalPropertyEditor::onPropertyItemPropertyChanged(const QString &prope qDebug() << "UniversalPropertyEditor::onPropertyItemPropertyChanged" << property_group << property_name; ParameterizedItem *subItem = m_item->getSubItems()[property_group]; if(subItem){ - qDebug() << "XXX "; QtVariantProperty *variant_property = m_item_to_propertyname_to_qtvariantproperty[subItem][property_name]; if(variant_property) { QVariant property_value = subItem->getRegisteredProperty(property_name); @@ -223,12 +222,12 @@ void UniversalPropertyEditor::onPropertyItemPropertyChanged(const QString &prope variant_property->setValue(property_value); -// PropertyAttribute prop_attribute = m_item->getPropertyAttribute(property_name); -// if(prop_attribute.getAppearance() & PropertyAttribute::DISABLED) { -// variant_property->setEnabled(false); -// } else { -// variant_property->setEnabled(true); -// } + PropertyAttribute prop_attribute = subItem->getPropertyAttribute(property_name); + if(prop_attribute.getAppearance() & PropertyAttribute::DISABLED) { + variant_property->setEnabled(false); + } else { + variant_property->setEnabled(true); + } connect(m_item, SIGNAL(propertyChanged(QString)), this, SLOT(onPropertyChanged(QString))); -- GitLab