1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-01 16:38:31 +00:00

Disallow polygon2D editing if internal vertices exists, as suggested in #24853

This commit is contained in:
Juan Linietsky
2019-02-13 13:11:39 -03:00
parent 7f69da488e
commit 419fb45a3e
4 changed files with 19 additions and 0 deletions

View File

@@ -297,6 +297,12 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
if (mb.is_valid()) {
String cant_edit = _why_cant_edit_polygon();
if (cant_edit != String()) {
EditorNode::get_singleton()->show_warning(cant_edit);
return true;
}
Transform2D xform = canvas_item_editor->get_canvas_transform() * _get_node()->get_global_transform();
Vector2 gpoint = mb->get_position();