diff options
-rw-r--r-- | src/client/inventorylistview.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/inventorylistview.cc b/src/client/inventorylistview.cc index b3dba61..49769ca 100644 --- a/src/client/inventorylistview.cc +++ b/src/client/inventorylistview.cc @@ -33,6 +33,8 @@ InventoryListView::~InventoryListView() void InventoryListView::set_inventory(core::Inventory *inventory, core::InfoType *infotype) { + const core::Item *selecteditem = (selected() ? selected()->item() : 0); + ListView::clear(); deselect(); @@ -46,7 +48,6 @@ void InventoryListView::set_inventory(core::Inventory *inventory, core::InfoType return; } - const core::Item *selecteditem = (selected() ? selected()->item() : 0); listview_timestamp = inventory->timestamp(); for (core::Inventory::Items::const_iterator it = inventory->items().begin(); it != inventory->items().end(); it++) { @@ -104,7 +105,6 @@ void InventoryListView::set_inventory(core::Inventory *inventory, core::InfoType sortkey.assign("-"); } - } else { if (item->amount() == 0) { |