diff options
| author | Juan Linietsky | 2018-04-07 17:04:12 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2018-04-07 17:04:12 -0300 |
| commit | 61d70fe47cfaa4efee505c7073aacfe34b66c217 (patch) | |
| tree | 1e55ce682e65673fdf9c3e418a58e53011474c04 | |
| parent | 14340efa3ccfb3a22ee594cea56ab9857814af6c (diff) | |
| download | godot-61d70fe47cfaa4efee505c7073aacfe34b66c217.tar.gz godot-61d70fe47cfaa4efee505c7073aacfe34b66c217.tar.zst godot-61d70fe47cfaa4efee505c7073aacfe34b66c217.zip | |
Document condition to avoid mistakes (like #17690)
| -rw-r--r-- | scene/2d/canvas_item.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 5cca5705a..918fb1616 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -821,6 +821,12 @@ float CanvasItem::draw_char(const Ref<Font> &p_font, const Point2 &p_pos, const void CanvasItem::_notify_transform(CanvasItem *p_node) { + /* This check exists to avoid re-propagating the transform + * notification down the tree on dirty nodes. It provides + * optimization by avoiding redundancy (nodes are dirty, will get the + * notification anyway). + */ + if (/*p_node->xform_change.in_list() &&*/ p_node->global_invalid) { return; //nothing to do } |
