From fbda0cc45c2f50b9b30175c4f2398b8a73d7bf4a Mon Sep 17 00:00:00 2001 From: Scayze Date: Fri, 25 Aug 2017 19:51:07 +0200 Subject: AutoUse Pencil on Polygon creation --- editor/plugins/polygon_2d_editor_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'editor/plugins/polygon_2d_editor_plugin.cpp') diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index d04184f05..be6f3429a 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -720,6 +720,10 @@ void Polygon2DEditor::edit(Node *p_collision_polygon) { if (p_collision_polygon) { node = Object::cast_to(p_collision_polygon); + //Enable the pencil tool if the polygon is empty + if (node->get_polygon().size() == 0) { + _menu_option(MODE_CREATE); + } if (!canvas_item_editor->get_viewport_control()->is_connected("draw", this, "_canvas_draw")) canvas_item_editor->get_viewport_control()->connect("draw", this, "_canvas_draw"); -- cgit v1.2.3-70-g09d2