summaryrefslogtreecommitdiff
path: root/src/dropshortcut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dropshortcut.cpp')
-rw-r--r--src/dropshortcut.cpp13
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;
+ }
+}