Remove error condition from get_global_transform()

(cherry picked from commit 2ff676a696a9cc1d77c0a8f4d5f31de8c7b5bc1a)
This commit is contained in:
kobewi 2022-10-21 14:20:57 +02:00 committed by Relintai
parent 17989ca8ef
commit 43cb6e940a
2 changed files with 1 additions and 4 deletions

View File

@ -301,7 +301,7 @@
<method name="get_global_transform" qualifiers="const"> <method name="get_global_transform" qualifiers="const">
<return type="Transform2D" /> <return type="Transform2D" />
<description> <description>
Returns the global transform matrix of this item. Returns the global transform matrix of this item, i.e. the combined transform up to the topmost [CanvasItem] node. The topmost item is a [CanvasItem] that either has no parent, has non-[CanvasItem] parent or it is top-level. See also [method set_as_toplevel].
</description> </description>
</method> </method>
<method name="get_global_transform_with_canvas" qualifiers="const"> <method name="get_global_transform_with_canvas" qualifiers="const">

View File

@ -482,9 +482,6 @@ Transform2D CanvasItem::get_global_transform_with_canvas() const {
} }
Transform2D CanvasItem::get_global_transform() const { Transform2D CanvasItem::get_global_transform() const {
#ifdef DEBUG_ENABLED
ERR_FAIL_COND_V(!is_inside_tree(), get_transform());
#endif
if (global_invalid) { if (global_invalid) {
const CanvasItem *pi = get_parent_item(); const CanvasItem *pi = get_parent_item();
if (pi) { if (pi) {