This commit is contained in:
sfence 2024-05-17 21:40:14 +02:00 committed by GitHub
commit 2f51172964
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -3800,7 +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))
if (m_selected_item && (m_selected_dragging
|| (m_left_dragging && (m_left_drag_stacks.size() > 1))))
return;
verifySelectedItem();
@ -4782,7 +4783,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;
@ -4817,7 +4818,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;
@ -4852,7 +4853,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;
@ -4876,7 +4877,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;

View File

@ -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