diff options
Diffstat (limited to 'src/theme_builder/components/properties/ThicknessPropertyEditor.cpp')
-rw-r--r-- | src/theme_builder/components/properties/ThicknessPropertyEditor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/theme_builder/components/properties/ThicknessPropertyEditor.cpp b/src/theme_builder/components/properties/ThicknessPropertyEditor.cpp index 56374e86..2d922b69 100644 --- a/src/theme_builder/components/properties/ThicknessPropertyEditor.cpp +++ b/src/theme_builder/components/properties/ThicknessPropertyEditor.cpp @@ -15,7 +15,7 @@ ThicknessPropertyEditor::ThicknessPropertyEditor() { auto thickness = thickness_mapper->MapFromString(text.ToString()); thickness_ = thickness; is_text_valid_ = true; - thickness_change_event_.Raise(thickness); + change_event_.Raise(nullptr); } catch (const Exception &) { is_text_valid_ = false; // TODO: Show error! @@ -27,11 +27,12 @@ ThicknessPropertyEditor::~ThicknessPropertyEditor() { container_.RemoveFromParent(); } -void ThicknessPropertyEditor::SetThickness(const ui::Thickness &thickness) { +void ThicknessPropertyEditor::SetValue(const ui::Thickness &thickness, + bool trigger_change) { thickness_ = thickness; text_.SetText(Format(u"{} {} {} {}", thickness_.left, thickness_.top, thickness_.right, thickness_.bottom)); is_text_valid_ = true; - thickness_change_event_.Raise(thickness_); + if (trigger_change) change_event_.Raise(nullptr); } } // namespace cru::theme_builder::components::properties |