summaryrefslogtreecommitdiff
path: root/src/gui/item_amount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/item_amount.cpp')
-rw-r--r--src/gui/item_amount.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index 036fdc15..021da3eb 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -38,7 +38,7 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent):
itemAmountOkButton = new Button("Okay");
itemAmountCancelButton = new Button("Cancel");
- itemAmountTextBox->setRange(1, inventoryWindow->items->getQuantity());
+ itemAmountTextBox->setRange(1, inventoryWindow->items->getItem()->getQuantity());
// Set button events Id
itemAmountMinusButton->setEventId("Minus");
@@ -108,12 +108,12 @@ void ItemAmountWindow::action(const std::string& eventId)
}
else if (eventId == "Drop")
{
- inventoryWindow->dropItem(inventoryWindow->items->getIndex(), itemAmountTextBox->getInt());
+ inventoryWindow->dropItem(inventoryWindow->items->getItem(), itemAmountTextBox->getInt());
scheduleDelete();
}
else if (eventId == "AddTrade")
{
- tradeWindow->tradeItem(inventoryWindow->items->getIndex(), itemAmountTextBox->getInt());
+ tradeWindow->tradeItem(inventoryWindow->items->getItem(), itemAmountTextBox->getInt());
scheduleDelete();
}
else if (eventId == "Plus")