From 9b3b13f78fffefb18f64aad88891d36009a8052e Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 17 Feb 2022 16:28:13 +0800 Subject: ... --- src/theme_builder/components/StyleRuleEditor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/theme_builder/components/StyleRuleEditor.cpp') 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 -- cgit v1.2.3