aboutsummaryrefslogtreecommitdiff
path: root/src/theme_builder/components/properties/CheckBoxPropertyEditor.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-17 18:32:52 +0800
committercrupest <crupest@outlook.com>2022-02-17 18:32:52 +0800
commitada641977cd57a50fc862243ba256c58efc065b8 (patch)
tree0f2124b88496f42e2cce2e3aaa64211131c18b37 /src/theme_builder/components/properties/CheckBoxPropertyEditor.cpp
parent9b3b13f78fffefb18f64aad88891d36009a8052e (diff)
downloadcru-ada641977cd57a50fc862243ba256c58efc065b8.tar.gz
cru-ada641977cd57a50fc862243ba256c58efc065b8.tar.bz2
cru-ada641977cd57a50fc862243ba256c58efc065b8.zip
...
Diffstat (limited to 'src/theme_builder/components/properties/CheckBoxPropertyEditor.cpp')
-rw-r--r--src/theme_builder/components/properties/CheckBoxPropertyEditor.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/theme_builder/components/properties/CheckBoxPropertyEditor.cpp b/src/theme_builder/components/properties/CheckBoxPropertyEditor.cpp
index 3b96b716..fb6f4705 100644
--- a/src/theme_builder/components/properties/CheckBoxPropertyEditor.cpp
+++ b/src/theme_builder/components/properties/CheckBoxPropertyEditor.cpp
@@ -6,19 +6,14 @@ CheckBoxPropertyEditor::CheckBoxPropertyEditor() {
container_.AddChild(&label_);
container_.AddChild(&check_box_);
- check_box_.CheckedChangeEvent()->AddSpyOnlyHandler([this] {
- if (!suppress_next_change_event_) {
- change_event_.Raise(nullptr);
- } else {
- suppress_next_change_event_ = false;
- }
- });
+ check_box_.CheckedChangeEvent()->AddSpyOnlyHandler(
+ [this] { RaiseChangeEvent(); });
}
CheckBoxPropertyEditor::~CheckBoxPropertyEditor() {}
void CheckBoxPropertyEditor::SetValue(bool value, bool trigger_change) {
- if (!trigger_change) suppress_next_change_event_ = true;
+ if (!trigger_change) SuppressNextChangeEvent();
check_box_.SetChecked(value);
}
} // namespace cru::theme_builder::components::properties