From fdcb19f45a9e931e1bb5a4cada1b01c468d0de94 Mon Sep 17 00:00:00 2001 From: mnaumov Date: Mon, 26 Apr 2021 17:48:49 -0700 Subject: [PATCH] Reverting some unused code --- .../UI/PropertyEditor/PropertyAssetCtrl.cpp | 2 -- .../UI/PropertyEditor/PropertyAssetCtrl.hxx | 2 +- .../UI/PropertyEditor/PropertyRowWidget.cpp | 12 ++++++------ .../UI/PropertyEditor/PropertyRowWidget.hxx | 2 -- .../Window/MaterialInspector/MaterialInspector.cpp | 2 -- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp index 11afd97197..dde33f2c7b 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp @@ -15,8 +15,6 @@ #include "PropertyAssetCtrl.hxx" #include "PropertyQTConstants.h" -#include "PropertyRowWidget.hxx" -#include "ReflectedPropertyEditor.hxx" AZ_PUSH_DISABLE_WARNING(4244 4251, "-Wunknown-warning-option") #include diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx index 6812805d02..ef3fca0c9e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx @@ -178,7 +178,7 @@ namespace AzToolsFramework void HandleFieldClear(); AZStd::string AddDefaultSuffix(const AZStd::string& filename); - + ////////////////////////////////////////////////////////////////////////// // AssetSystemBus void SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid sourceUUID) override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp index 1403952b19..8c371baf8c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp @@ -387,17 +387,17 @@ namespace AzToolsFramework QString PropertyRowWidget::label() const { - return m_title; + return m_nameLabel->text(); } void PropertyRowWidget::SetNameLabel(const char* text) { - m_title = text; - m_nameLabel->setText(m_title); - m_nameLabel->setVisible(!m_title.isEmpty()); + QString label{ text }; + m_nameLabel->setText(label); + m_nameLabel->setVisible(!label.isEmpty()); // setting the stretches to 0 in case of an empty label really hides the label (i.e. even the reserved space) - m_mainLayout->setStretch(0, m_title.isEmpty() ? 0 : LabelColumnStretch); - m_mainLayout->setStretch(1, m_title.isEmpty() ? 0 : ValueColumnStretch); + m_mainLayout->setStretch(0, label.isEmpty() ? 0 : LabelColumnStretch); + m_mainLayout->setStretch(1, label.isEmpty() ? 0 : ValueColumnStretch); m_identifier = AZ::Crc32(text); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.hxx index 113ef2a6ab..e4b538ccdc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.hxx @@ -175,8 +175,6 @@ namespace AzToolsFramework QLabel* m_defaultLabel; // if there is no handler, we use a m_defaultLabel label InstanceDataNode* m_sourceNode; - QString m_title; - QString m_groupTitle; QString m_currentFilterString; struct ChangeNotification diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp index 776af3147b..b066c3c7dd 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp @@ -93,8 +93,6 @@ namespace MaterialEditor [this](const AzToolsFramework::InstanceDataNode* source, const AzToolsFramework::InstanceDataNode* target) { AZ_UNUSED(source); const AtomToolsFramework::DynamicProperty* property = AtomToolsFramework::FindDynamicPropertyForInstanceDataNode(target); - - //property->AddEditDataAttributeMemberFunction(AZ::Edit::Attributes::NameLabelOverride, &DynamicProperty::GetDisplayName); return property && AtomToolsFramework::ArePropertyValuesEqual(property->GetValue(), property->GetConfig().m_parentValue); }); AddGroup(groupNameId, groupDisplayName, groupDescription, propertyGroupWidget);