From 2711b7032cafdc9bdbd6ae06db0325c91e6e7f63 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 16 Feb 2022 21:17:09 +0800 Subject: ... --- src/ui/style/StyleRuleSet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ui/style/StyleRuleSet.cpp') diff --git a/src/ui/style/StyleRuleSet.cpp b/src/ui/style/StyleRuleSet.cpp index 7352f69b..c8d12500 100644 --- a/src/ui/style/StyleRuleSet.cpp +++ b/src/ui/style/StyleRuleSet.cpp @@ -54,6 +54,12 @@ void StyleRuleSet::RemoveStyleRule(gsl::index index, gsl::index count) { RaiseChangeEvent(); } +void StyleRuleSet::SetStyleRule(Index index, StyleRule rule) { + Expects(index >= 0 && index < GetSize()); + rules_[index] = std::move(rule); + RaiseChangeEvent(); +} + void StyleRuleSet::Set(const StyleRuleSet& other, bool set_parent) { rules_ = other.rules_; if (set_parent) parent_ = other.parent_; -- cgit v1.2.3