summaryrefslogtreecommitdiff
path: root/src/dropshortcut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dropshortcut.cpp')
-rw-r--r--src/dropshortcut.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dropshortcut.cpp b/src/dropshortcut.cpp
index 763a7aadd..55046c0f6 100644
--- a/src/dropshortcut.cpp
+++ b/src/dropshortcut.cpp
@@ -75,7 +75,10 @@ void DropShortcut::save()
for (int i = 0; i < DROP_SHORTCUT_ITEMS; i++)
{
const int itemId = mItems[i] ? mItems[i] : -1;
- serverConfig.setValue("drop" + toString(i), itemId);
+ if (itemId != -1)
+ serverConfig.setValue("drop" + toString(i), itemId);
+ else
+ serverConfig.deleteKey("drop" + toString(i));
}
}