From ada641977cd57a50fc862243ba256c58efc065b8 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 17 Feb 2022 18:32:52 +0800 Subject: ... --- .../components/properties/SelectPropertyEditor.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/theme_builder/components/properties/SelectPropertyEditor.h') diff --git a/src/theme_builder/components/properties/SelectPropertyEditor.h b/src/theme_builder/components/properties/SelectPropertyEditor.h index a67cb80f..475d2d0a 100644 --- a/src/theme_builder/components/properties/SelectPropertyEditor.h +++ b/src/theme_builder/components/properties/SelectPropertyEditor.h @@ -1,11 +1,11 @@ #pragma once -#include "cru/ui/components/Component.h" +#include "../Editor.h" #include "cru/ui/components/Select.h" #include "cru/ui/controls/FlexLayout.h" #include "cru/ui/controls/TextBlock.h" namespace cru::theme_builder::components::properties { -class SelectPropertyEditor : public ui::components::Component { +class SelectPropertyEditor : public Editor { public: using PropertyType = Index; @@ -20,7 +20,7 @@ class SelectPropertyEditor : public ui::components::Component { Index GetSelectedIndex() const { return select_.GetSelectedIndex(); } void SetSelectedIndex(Index index, bool trigger_change = true) { - if (trigger_change == false) suppress_next_change_event_ = true; + if (trigger_change == false) SuppressNextChangeEvent(); select_.SetSelectedIndex(index); } @@ -34,14 +34,9 @@ class SelectPropertyEditor : public ui::components::Component { SetSelectedIndex(value, trigger_change); } - IEvent* ChangeEvent() { return &change_event_; } - private: ui::controls::FlexLayout container_; ui::controls::TextBlock label_; ui::components::Select select_; - - bool suppress_next_change_event_ = false; - Event change_event_; }; } // namespace cru::theme_builder::components::properties -- cgit v1.2.3