fix crash autotile edit mode
This commit is contained in:
parent
9f590b460e
commit
cceb176be3
|
@ -1023,6 +1023,9 @@ void AutotileEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (tools[SHAPE_NEW_POLYGON]->is_pressed()) {
|
} 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_valid()) {
|
||||||
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
|
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
|
||||||
Vector2 pos = mb->get_position();
|
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) {
|
} else if (mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT && current_shape.size() > 2) {
|
||||||
if (creating_shape) {
|
if (creating_shape) {
|
||||||
close_shape(shape_anchor);
|
close_shape(shape_anchor);
|
||||||
|
if (tools[TOOL_SELECT]->is_disabled())
|
||||||
|
tools[TOOL_SELECT]->set_disabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (mm.is_valid()) {
|
} else if (mm.is_valid()) {
|
||||||
|
|
Loading…
Reference in New Issue