From ff3e3d5c6da770391daa4314410e2e716569f7f4 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Wed, 18 Mar 2009 18:41:55 -0600 Subject: A few more fixes in the ItemAmount dialog --- src/gui/item_amount.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp index aca7ff52..b440dfc0 100644 --- a/src/gui/item_amount.cpp +++ b/src/gui/item_amount.cpp @@ -55,7 +55,7 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item): minusButton->setSize(20, 20); Button *plusButton = new Button("+", "Plus", this); plusButton->setSize(20, 20); - Button *okButton = new Button(_("Ok"), "Drop", this); + Button *okButton = new Button(_("Ok"), "Ok", this); Button *cancelButton = new Button(_("Cancel"), "Cancel", this); Button *addAllButton = new Button(_("All"), "All", this); @@ -144,8 +144,12 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event) } scheduleDelete(); + return; } + if (amount < 0) amount = 0; + else if (amount > mMax) amount = mMax; + mItemAmountTextField->setValue(amount); mItemAmountSlide->setValue(amount); } -- cgit v1.2.3-70-g09d2