Skip to content

Commit

Permalink
Show drag targets only when the inventory is shown
Browse files Browse the repository at this point in the history
  • Loading branch information
heimskr committed Dec 13, 2023
1 parent bd32b14 commit e2ab197
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ui/tab/InventoryTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ namespace Game3 {
scrolled.set_vexpand();

vbox.set_spacing(0);
vbox.append(actionBox);
actionBox.set_hexpand(true);
actionBox.set_halign(Gtk::Align::CENTER);
actionBox.set_margin_top(5);
Expand Down Expand Up @@ -128,6 +127,7 @@ namespace Game3 {
lastGame = nullptr;
if (inventoryModule) {
vbox.remove(inventoryModule->getWidget());
vbox.remove(actionBox);
inventoryModule.reset();
}
return;
Expand Down Expand Up @@ -308,7 +308,8 @@ namespace Game3 {
if (!inventoryModule) {
inventoryModule.emplace(game, client_inventory, this, sigc::mem_fun(*this, &InventoryTab::gmenuSetup));
inventoryModule->setShowLabel(false);
vbox.insert_child_after(inventoryModule->getWidget(), actionBox);
vbox.prepend(inventoryModule->getWidget());
vbox.prepend(actionBox);
}
populate(client_inventory);
}
Expand Down

0 comments on commit e2ab197

Please sign in to comment.