summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/gui/item_amount.cpp8
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 732d96da..6cff0a18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2007-10-24 Philipp Sehmisch <tmw@crushnet.org>
+2007-19-26 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/gui/item_ammount.cpp: Item amount dialog is now skipped
+ when there is only one item on the stack.
+
+2007-10-24 Philipp Sehmisch <tmw@crushnet.org>
* data/items.xml, data/graphics/items/generic-darkcrystal.png:
Added a new quest loot item for the halloween event.
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index f72462f9..801a9ce8 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -35,6 +35,14 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item):
Window("Select amount of items to drop.", true, parent),
mItem(item)
{
+ //when there is only one item on the stack skip the dialog
+ if (mItem->getQuantity() == 1)
+ {
+ player_node->dropItem(mItem, 1);
+ scheduleDelete();
+ return;
+ };
+
// New labels
mItemAmountTextBox = new IntTextBox(1);