mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
fix: InventoryView: when moving one object with the right mouse button, the phantom remained
This commit is contained in:
parent
c6c23c3c53
commit
c7da5fa569
1 changed files with 6 additions and 4 deletions
|
|
@ -126,9 +126,7 @@ static std::wstring get_caption_string(
|
||||||
langs::get(util::str2wstr_utf8(caption->asString()))
|
langs::get(util::str2wstr_utf8(caption->asString()))
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return util::pascal_case(
|
return util::pascal_case(langs::get(util::str2wstr_utf8(item.caption)));
|
||||||
langs::get(util::str2wstr_utf8(item.caption))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Refactor
|
// TODO: Refactor
|
||||||
|
|
@ -395,7 +393,11 @@ void SlotView::performRightClick(ItemStack& stack, ItemStack& grabbed) {
|
||||||
int halfremain = stack.getCount() / 2;
|
int halfremain = stack.getCount() / 2;
|
||||||
grabbed.setCount(stack.getCount() - halfremain);
|
grabbed.setCount(stack.getCount() - halfremain);
|
||||||
// reset all data in the origin slot
|
// reset all data in the origin slot
|
||||||
stack = ItemStack(stack.getItemId(), halfremain);
|
if (stack.getCount() > 1) {
|
||||||
|
stack = ItemStack(stack.getItemId(), halfremain);
|
||||||
|
} else {
|
||||||
|
stack = ItemStack(0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue