diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-02-13 13:11:39 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2019-02-13 13:11:39 -0300 |
commit | 419fb45a3eea68516828fe4541a62f8641cf13ef (patch) | |
tree | 921a86a3dd4cb4ea3b6c5fc2c9ae693aa3411b1e /editor/plugins/abstract_polygon_2d_editor.cpp | |
parent | 7f69da488e971b035fbdf044536db1ce9a100d50 (diff) |
Disallow polygon2D editing if internal vertices exists, as suggested in #24853
Diffstat (limited to 'editor/plugins/abstract_polygon_2d_editor.cpp')
-rw-r--r-- | editor/plugins/abstract_polygon_2d_editor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index 41e2062ab2..8f6f244e8f 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -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(); |