You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
AutoUse Pencil on Polygon creation
This commit is contained in:
@@ -720,6 +720,10 @@ void Polygon2DEditor::edit(Node *p_collision_polygon) {
|
||||
if (p_collision_polygon) {
|
||||
|
||||
node = Object::cast_to<Polygon2D>(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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user