1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-25 15:37:42 +00:00

TileMapEditor Fix interrupted erasing not being properly finished

This commit is contained in:
kleonc
2022-07-18 22:29:50 +02:00
parent e1e22be3bc
commit 66551a94be

View File

@@ -1171,6 +1171,17 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return false; // Drag.
}
// Finish ongoing erasing.
if (tool == TOOL_ERASING || tool == TOOL_RECTANGLE_ERASE || tool == TOOL_LINE_ERASE) {
_finish_undo();
if (tool == TOOL_RECTANGLE_ERASE || tool == TOOL_LINE_ERASE) {
CanvasItemEditor::get_singleton()->update_viewport();
}
tool = TOOL_NONE;
}
if (tool == TOOL_NONE) {
if (mb->get_shift()) {
if (mb->get_command()) {