aboutsummaryrefslogtreecommitdiff
path: root/src/theme_builder/components/StyleRuleEditor.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-17 16:28:13 +0800
committercrupest <crupest@outlook.com>2022-02-17 16:28:13 +0800
commit9b3b13f78fffefb18f64aad88891d36009a8052e (patch)
tree6f5b7e45607b021a4aa0fc1fd2de29ec916d8bcd /src/theme_builder/components/StyleRuleEditor.cpp
parent77e0fd5cf7dd35324a7c3a43f2004fb923c6254c (diff)
downloadcru-9b3b13f78fffefb18f64aad88891d36009a8052e.tar.gz
cru-9b3b13f78fffefb18f64aad88891d36009a8052e.tar.bz2
cru-9b3b13f78fffefb18f64aad88891d36009a8052e.zip
...
Diffstat (limited to 'src/theme_builder/components/StyleRuleEditor.cpp')
-rw-r--r--src/theme_builder/components/StyleRuleEditor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/theme_builder/components/StyleRuleEditor.cpp b/src/theme_builder/components/StyleRuleEditor.cpp
index b697f92c..aa2806b1 100644
--- a/src/theme_builder/components/StyleRuleEditor.cpp
+++ b/src/theme_builder/components/StyleRuleEditor.cpp
@@ -33,5 +33,13 @@ void StyleRuleEditor::SetValue(const ui::style::StyleRule& style_rule,
components::stylers::CreateStylerEditor(style_rule.GetStyler());
right_layout_.AddChild(condition_editor_->GetRootControl());
right_layout_.AddChild(styler_editor_->GetRootControl());
+ condition_editor_->ChangeEvent()->AddSpyOnlyHandler(
+ [this] { change_event_.Raise(nullptr); });
+ styler_editor_->ChangeEvent()->AddSpyOnlyHandler(
+ [this] { change_event_.Raise(nullptr); });
+
+ if (trigger_change) {
+ change_event_.Raise(nullptr);
+ }
}
} // namespace cru::theme_builder