diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-03 02:57:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-03 02:57:47 +0300 |
commit | b1d2dc573da58236e8a972bbab7a52345aeee8c1 (patch) | |
tree | 6493c7de529b6cce7a3cee38b23b58b7e2da3711 /src/dropshortcut.cpp | |
parent | 51ff8587d3a008e9c4867b18034640f58063d4a8 (diff) | |
download | manaverse-b1d2dc573da58236e8a972bbab7a52345aeee8c1.tar.gz manaverse-b1d2dc573da58236e8a972bbab7a52345aeee8c1.tar.bz2 manaverse-b1d2dc573da58236e8a972bbab7a52345aeee8c1.tar.xz manaverse-b1d2dc573da58236e8a972bbab7a52345aeee8c1.zip |
Add option clear to context menu in drops window.
Diffstat (limited to 'src/dropshortcut.cpp')
-rw-r--r-- | src/dropshortcut.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/dropshortcut.cpp b/src/dropshortcut.cpp index 4deb8901d..c3ba98a27 100644 --- a/src/dropshortcut.cpp +++ b/src/dropshortcut.cpp @@ -43,9 +43,7 @@ DropShortcut::DropShortcut(): mItemSelected(-1), mItemColorSelected(1) { - for (int i = 0; i < DROP_SHORTCUT_ITEMS; i++) - mItems[i] = -1; - + clear(); load(); mLastDropIndex = 0; } @@ -225,3 +223,12 @@ void DropShortcut::setItem(int index) mItemColors[index] = mItemColorSelected; save(); } + +void DropShortcut::clear() +{ + for (int i = 0; i < DROP_SHORTCUT_ITEMS; i++) + { + mItems[i] = -1; + mItemColors[i] = 1; + } +} |