summaryrefslogtreecommitdiff
path: root/editor/plugins/tiles/tile_map_editor.cpp
diff options
context:
space:
mode:
authorFazil Babu <fazil47babu@gmail.com>2021-11-29 20:18:15 +0530
committerFazil Babu <fazil47babu@gmail.com>2021-11-30 00:23:44 +0530
commit61c2d397d61b4193e7033eddb449344310d6d97c (patch)
treeec0c2eb8dbf98d240a4cac2cb88997489e5c0015 /editor/plugins/tiles/tile_map_editor.cpp
parent9d3875dde75b95ea172c60188ca345162f2b38b9 (diff)
Right-clicking with copied tiles cancels it
Diffstat (limited to 'editor/plugins/tiles/tile_map_editor.cpp')
-rw-r--r--editor/plugins/tiles/tile_map_editor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp
index 73b1fc7c67..37d52174f9 100644
--- a/editor/plugins/tiles/tile_map_editor.cpp
+++ b/editor/plugins/tiles/tile_map_editor.cpp
@@ -598,7 +598,10 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p
}
if (drag_type == DRAG_TYPE_CLIPBOARD_PASTE) {
- // Do nothing.
+ // Cancel tile pasting on right-click
+ if (mb->get_button_index() == MouseButton::RIGHT) {
+ drag_type = DRAG_TYPE_NONE;
+ }
} else if (tool_buttons_group->get_pressed_button() == select_tool_button) {
drag_start_mouse_pos = mpos;
if (tile_map_selection.has(tile_map->world_to_map(drag_start_mouse_pos)) && !mb->is_shift_pressed()) {