From 939c5f5c9effce84b55d1ff1ead33dda62c5d3d6 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 2 Jan 2016 20:32:19 -0300 Subject: [PATCH] -Fix global transform cache not being cleared in 2D nodes, fixes many editor bugs, closes #2115 --- scene/2d/canvas_item.cpp | 1 + tools/editor/plugins/polygon_2d_editor_plugin.cpp | 1 - tools/editor/property_editor.cpp | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index adb3574dd9b..35b453d71d2 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -548,6 +548,7 @@ void CanvasItem::_notification(int p_what) { get_parent()->cast_to()->children_items.erase(C); C=NULL; } + global_invalid=true; } break; case NOTIFICATION_DRAW: { diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp index fc71a64dbdc..3e9c58d604c 100644 --- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp @@ -755,7 +755,6 @@ void Polygon2DEditor::edit(Node *p_collision_polygon) { canvas_item_editor=CanvasItemEditor::get_singleton(); } - if (p_collision_polygon) { node=p_collision_polygon->cast_to(); diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index 9989169b0eb..fc5fce1d470 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -3108,8 +3108,6 @@ void PropertyEditor::update_tree() { item->add_button(1,get_icon("Reload","EditorIcons"),3); } } - } else { - print_line("no default value!"); }