From 4f49eb94ddf9d2f0f3c59560c761188d101bd5f8 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Thu, 25 Oct 2007 23:47:10 +0000 Subject: Item amount dialog is now skipped when there is only one item on the stack. --- src/gui/item_amount.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2