diff options
author | crupest <crupest@outlook.com> | 2022-02-16 21:17:09 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-16 21:17:09 +0800 |
commit | 2711b7032cafdc9bdbd6ae06db0325c91e6e7f63 (patch) | |
tree | 9f19ec2697e1cf27895540f989d52946dcf4adab /src/ui | |
parent | c6de932f727ed324cf875ea3fca9ca44775a820e (diff) | |
download | cru-2711b7032cafdc9bdbd6ae06db0325c91e6e7f63.tar.gz cru-2711b7032cafdc9bdbd6ae06db0325c91e6e7f63.tar.bz2 cru-2711b7032cafdc9bdbd6ae06db0325c91e6e7f63.zip |
...
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/style/StyleRuleSet.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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_; |