From 69f04f12d9793e93ea76874f71b7c99c55459b10 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 22 Nov 2012 22:34:49 +0300 Subject: Fix drops shortcuts loading. --- src/dropshortcut.cpp | 7 ++++--- src/dropshortcut.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/dropshortcut.cpp b/src/dropshortcut.cpp index 4e0718d16..1211c228d 100644 --- a/src/dropshortcut.cpp +++ b/src/dropshortcut.cpp @@ -43,7 +43,7 @@ DropShortcut::DropShortcut() : mItemColorSelected(1), mLastDropIndex(0) { - clear(); + clear(false); load(); } @@ -224,12 +224,13 @@ void DropShortcut::setItem(const int index) save(); } -void DropShortcut::clear() +void DropShortcut::clear(bool isSave) { for (int i = 0; i < DROP_SHORTCUT_ITEMS; i++) { mItems[i] = -1; mItemColors[i] = 1; } - save(); + if (isSave) + save(); } diff --git a/src/dropshortcut.h b/src/dropshortcut.h index 7f3ec46eb..3026ee9f5 100644 --- a/src/dropshortcut.h +++ b/src/dropshortcut.h @@ -146,7 +146,7 @@ class DropShortcut final */ void dropItems(const int cnt = 1); - void clear(); + void clear(bool isSave = true); private: -- cgit v1.2.3-60-g2f50