diff --git a/GUI/coregui/Models/SessionDecorationModel.cpp b/GUI/coregui/Models/SessionDecorationModel.cpp index 5bbcc9679f0f9deb816d02a67d3264bd86efea8c..1018067c8eecd060b2b728c0f750aeb0b7a8a0db 100644 --- a/GUI/coregui/Models/SessionDecorationModel.cpp +++ b/GUI/coregui/Models/SessionDecorationModel.cpp @@ -67,12 +67,6 @@ QVariant SessionDecorationModel::data(const QModelIndex& index, int role) const return result; } -// FIXME Bigger font size is necessary for ComponentEditor. The recipe below does the trick -// but also affects InstrumentView. Find solution suitable for both QListView and QTreeView. -// if (role == Qt::SizeHintRole) { -// return QSize(28, 28); -// } - return QIdentityProxyModel::data(index, role); } diff --git a/GUI/coregui/Views/PropertyEditor/CustomEditors.cpp b/GUI/coregui/Views/PropertyEditor/CustomEditors.cpp index df0896689a08904c9e48fa2f14e809d3f39fdefb..6393a9be6aef85ccf3c61f0f270e4bae37394c90 100644 --- a/GUI/coregui/Views/PropertyEditor/CustomEditors.cpp +++ b/GUI/coregui/Views/PropertyEditor/CustomEditors.cpp @@ -156,7 +156,6 @@ void ComboPropertyEditor::onIndexChanged(int index) if (comboProperty.currentIndex() != index) { comboProperty.setCurrentIndex(index); setDataIntern(QVariant::fromValue<ComboProperty>(comboProperty)); - currentIndexChanged(index); } } diff --git a/GUI/coregui/Views/PropertyEditor/CustomEditors.h b/GUI/coregui/Views/PropertyEditor/CustomEditors.h index c10f1a8288826798fe1aed9dc856a6b40a20925a..d2a9bfeb0263ddee14ac65b75a2d086ff80d2c9a 100644 --- a/GUI/coregui/Views/PropertyEditor/CustomEditors.h +++ b/GUI/coregui/Views/PropertyEditor/CustomEditors.h @@ -82,10 +82,6 @@ public: QSize sizeHint() const; QSize minimumSizeHint() const; -signals: - //! Signal which is used only in the context of ComponentFlatView - void currentIndexChanged(int); - protected slots: virtual void onIndexChanged(int index); diff --git a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.cpp b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.cpp index b1ed7835a6e6d10f4ad4657730ad426a8060b7ea..3c23860285b3a801cb3f44b0ee3673e3a1270a69 100644 --- a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.cpp +++ b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.cpp @@ -314,8 +314,6 @@ void ObsoletePropertyVariantFactory::slotSetValue(const ComboProperty &value) QVariant var; var.setValue(value); manager->setValue(property, var); - // FIXME g.p. Is it the right place to delete? Check other factories. - //object->deleteLater(); return; } itEditor++; diff --git a/GUI/coregui/Views/PropertyEditor/PropertyEditorFactory.cpp b/GUI/coregui/Views/PropertyEditor/PropertyEditorFactory.cpp index ec234cebafb93cc6d4d7b2a91a36c71e8365767e..6c301bdbff694102a24af5924a28f4bcf2b604e2 100644 --- a/GUI/coregui/Views/PropertyEditor/PropertyEditorFactory.cpp +++ b/GUI/coregui/Views/PropertyEditor/PropertyEditorFactory.cpp @@ -84,7 +84,6 @@ bool PropertyEditorFactory::IsCustomVariant(const QVariant& variant) return false; } -// TODO replace with template method when custom variants refactored QString PropertyEditorFactory::ToString(const QVariant& variant) { if (isExternalProperty(variant)) diff --git a/GUI/coregui/Views/PropertyEditor/PropertyWidgetItem.cpp b/GUI/coregui/Views/PropertyEditor/PropertyWidgetItem.cpp index d2f7c65837cee1fdb8ba09913ecacc82aefd46a7..ae1dfe437c20cb67609f117b6b0f8918bff14d17 100644 --- a/GUI/coregui/Views/PropertyEditor/PropertyWidgetItem.cpp +++ b/GUI/coregui/Views/PropertyEditor/PropertyWidgetItem.cpp @@ -99,7 +99,9 @@ void PropertyWidgetItem::connectEditor(QWidget* editor) { if (auto combo = dynamic_cast<ComboPropertyEditor*>(editor)) { // Hack: QDataWidgetMapper doesn't listen for the widget (QComboBox is somewhat special). - connect(combo, &ComboPropertyEditor::currentIndexChanged, +// connect(combo, &ComboPropertyEditor::currentIndexChanged, +// [=] { m_delegate->commitData(combo); }); + connect(combo, &ComboPropertyEditor::dataChanged, [=] { m_delegate->commitData(combo); }); // TODO after merging GroupProperty and ComboProperty diff --git a/Tests/UnitTests/GUI/TestLayerItems.h b/Tests/UnitTests/GUI/TestLayerItems.h index 5b7ba517b352fc0967763bc7137151998bc07a8d..ecb99a56174661283fc9de525c8ae11d045a024f 100644 --- a/Tests/UnitTests/GUI/TestLayerItems.h +++ b/Tests/UnitTests/GUI/TestLayerItems.h @@ -14,7 +14,6 @@ class TestLayerItems : public QObject { private slots: void test_LayerDefaultMaterial(); -// void test_onMaterialChange(); }; //! Checking default material of the layer. @@ -30,26 +29,3 @@ inline void TestLayerItems::test_LayerDefaultMaterial() QCOMPARE(material.text(), QString("Default")); QCOMPARE(material.identifier(), defMaterial->getItemValue(MaterialItem::P_IDENTIFIER).toString()); } - -//! Checks that change of material in MaterialModel is propagated to the LayerItem. - -//inline void TestLayerItems::test_onMaterialChange() -//{ -// ApplicationModels models; -// auto layer = models.sampleModel()->insertNewItem(Constants::LayerType); -// auto materials = models.materialModel()->topItems(); -// auto defMaterial = materials.front(); - -// int property_changed(0); -// layer->mapper()->setOnPropertyChange([&property_changed](const QString& name) { -// if (name == LayerItem::P_MATERIAL) -// ++property_changed; -// }, this); - -// defMaterial->setItemName("NewName"); -// QCOMPARE(property_changed, 2); // should be ==1, Fixme after implementing MaterialPropertyController -// MaterialProperty material = layer->getItemValue(LayerItem::P_MATERIAL).value<MaterialProperty>(); - -// // FIXME reenable after MaterialPropertyController implementation -//// QCOMPARE(material.getName(), QString("NewName")); -//}