Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sfence committed May 14, 2024
1 parent 6303334 commit 297434c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/gui/guiFormSpecMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3800,8 +3800,8 @@ void GUIFormSpecMenu::showTooltip(const std::wstring &text,
void GUIFormSpecMenu::updateSelectedItem()
{
// Don't update when dragging an item
if (m_selected_item && (m_selected_dragging || m_left_dragging))
return;
//if (m_selected_item && (m_selected_dragging || m_left_dragging))
// return;

verifySelectedItem();

Expand Down Expand Up @@ -4782,7 +4782,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
}

if (move_amount > 0) {
infostream << "Handing IAction::Move to manager" << std::endl;
infostream << "Handing IAction::Move to manager (move)" << std::endl;
IMoveAction *a = new IMoveAction();
a->count = move_amount;
a->from_inv = m_selected_item->inventoryloc;
Expand Down Expand Up @@ -4817,7 +4817,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
if (pickup_amount > 0) {
m_selected_amount += pickup_amount;

infostream << "Handing IAction::Move to manager" << std::endl;
infostream << "Handing IAction::Move to manager (pickup)" << std::endl;
IMoveAction *a = new IMoveAction();
a->count = pickup_amount;
a->from_inv = s.inventoryloc;
Expand Down Expand Up @@ -4852,7 +4852,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
if (shift_move_amount == 0)
break;

infostream << "Handing IAction::Move to manager" << std::endl;
infostream << "Handing IAction::Move to manager (shift-move)" << std::endl;
IMoveAction *a = new IMoveAction();
a->count = shift_move_amount;
a->from_inv = s.inventoryloc;
Expand All @@ -4876,7 +4876,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
assert(drop_amount > 0 && drop_amount <= m_selected_amount);
m_selected_amount -= drop_amount;

infostream << "Handing IAction::Drop to manager" << std::endl;
infostream << "Handing IAction::Drop to manager (drop)" << std::endl;
IDropAction *a = new IDropAction();
a->count = drop_amount;
a->from_inv = m_selected_item->inventoryloc;
Expand Down
3 changes: 1 addition & 2 deletions src/inventorymanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
if (from_inv.type == InventoryLocation::PLAYER)
list_from->setModified();

if (to_inv.type == InventoryLocation::PLAYER)
list_to->setModified();
list_to->setModified();

infostream<<"IMoveAction::apply(): move was completely disallowed:"
<<" move_count="<<old_move_count
Expand Down

0 comments on commit 297434c

Please sign in to comment.