Skip to content

Commit

Permalink
Merge pull request #16742 from damarindra/fix_crash_edit_mode
Browse files Browse the repository at this point in the history
fix crash autotile edit mode
  • Loading branch information
akien-mga authored Feb 16, 2018
2 parents 9f590b4 + cceb176 commit 49dc473
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/plugins/tile_set_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit 49dc473

Please sign in to comment.