From e80f44385dee8636b747848ecb6193c41a99d89c Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 24 Feb 2022 16:35:08 +0800 Subject: ... --- src/ui/style/StyleRuleSet.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/ui/style/StyleRuleSet.cpp') diff --git a/src/ui/style/StyleRuleSet.cpp b/src/ui/style/StyleRuleSet.cpp index c8d12500..6b475c8c 100644 --- a/src/ui/style/StyleRuleSet.cpp +++ b/src/ui/style/StyleRuleSet.cpp @@ -112,10 +112,9 @@ void StyleRuleSetBind::UpdateStyle() { // reverse. for (auto iter = ruleset_chain_cache_.crbegin(); iter != ruleset_chain_cache_.crend(); ++iter) { - for (const auto& rule : (*iter)->GetRules()) - if (rule.GetCondition()->Judge(control_)) { - rule.GetStyler()->Apply(control_); - } + for (const auto& rule : (*iter)->GetRules()) { + rule.CheckAndApply(control_); + } } } } // namespace cru::ui::style -- cgit v1.2.3