diff options
author | Richard Maudsley <richard.maudsley@isode.com> | 2014-07-16 13:47:27 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2014-07-29 09:48:04 (GMT) |
commit | 4ab20a452e0af56c7ee210f863aeae31450954cc (patch) | |
tree | be0a3777eb7bd814e4c6b9660a77dbb8fafb90d3 /Swift/Controllers/HighlightManager.h | |
parent | 9c5c731845881996f45b32ea6de12e0647f4634d (diff) | |
download | swift-contrib-4ab20a452e0af56c7ee210f863aeae31450954cc.zip swift-contrib-4ab20a452e0af56c7ee210f863aeae31450954cc.tar.bz2 |
Add ability to reorder highlight rules list.
Test-Information:
Add several highlight rules. Verify that the up and down buttons reorder the items in the list.
Change-Id: I6272799e2b2767ddfa01068c2ffcd1fb4651e11d
Diffstat (limited to 'Swift/Controllers/HighlightManager.h')
-rw-r--r-- | Swift/Controllers/HighlightManager.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/Controllers/HighlightManager.h b/Swift/Controllers/HighlightManager.h index 3da72eb..07a3fe3 100644 --- a/Swift/Controllers/HighlightManager.h +++ b/Swift/Controllers/HighlightManager.h @@ -36,4 +36,7 @@ namespace Swift { list_.insert(list_.end(), rhs.list_.begin(), rhs.list_.end()); } + void setRule(const size_t index, const HighlightRule& rule) { + list_[index] = rule; + } private: std::vector<HighlightRule> list_; @@ -50,4 +53,5 @@ namespace Swift { void insertRule(int index, const HighlightRule& rule); void removeRule(int index); + void swapRules(const size_t first, const size_t second); void storeSettings(); void loadSettings(); |