diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-02-16 12:20:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 12:20:06 +0100 |
commit | 49dc473ff184683485c0e69f4f1d49c63f6be6a7 (patch) | |
tree | 3e4144ef9412fd0f4ba2ce5c35ee36e01e12d695 /editor | |
parent | 9f590b460ee8f6e0026b14fbc336b7b7ad977ee0 (diff) | |
parent | cceb176be372c4c07c18d707e794ee8c3a8873e8 (diff) |
Merge pull request #16742 from damarindra/fix_crash_edit_mode
fix crash autotile edit mode
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 5 |
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 dd5127181d..2ff8536b4c 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()) { |