aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordamarindra2018-02-16 17:48:01 +0700
committerHein-Pieter van Braam2018-02-19 22:30:13 +0100
commit9f9731da3a57e70a698b330b845fc435ef325d04 (patch)
tree6477f7740169ac4dfa171d3cbf98d7f1b3efc132
parent18735ff6f2db987b799f252fb0716ecd23347d30 (diff)
downloadgodot-9f9731da3a57e70a698b330b845fc435ef325d04.tar.gz
godot-9f9731da3a57e70a698b330b845fc435ef325d04.tar.zst
godot-9f9731da3a57e70a698b330b845fc435ef325d04.zip
fix crash autotile edit mode
(cherry picked from commit cceb176be372c4c07c18d707e794ee8c3a8873e8)
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index dd5127181..2ff8536b4 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -1023,6 +1023,9 @@ void AutotileEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
}
}
} else if (tools[SHAPE_NEW_POLYGON]->is_pressed()) {
+ if (!tools[TOOL_SELECT]->is_disabled())
+ tools[TOOL_SELECT]->set_disabled(true);
+
if (mb.is_valid()) {
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
Vector2 pos = mb->get_position();
@@ -1089,6 +1092,8 @@ void AutotileEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
} else if (mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT && current_shape.size() > 2) {
if (creating_shape) {
close_shape(shape_anchor);
+ if (tools[TOOL_SELECT]->is_disabled())
+ tools[TOOL_SELECT]->set_disabled(false);
}
}
} else if (mm.is_valid()) {