Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove error condition from get_global_transform() #67710

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove error condition from get_global_transform()
  • Loading branch information
KoBeWi committed Oct 21, 2022
commit 2ff676a696a9cc1d77c0a8f4d5f31de8c7b5bc1a
2 changes: 1 addition & 1 deletion doc/classes/CanvasItem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
<method name="get_global_transform" qualifiers="const">
<return type="Transform2D" />
<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 has [member top_level] enabled.
</description>
</method>
<method name="get_global_transform_with_canvas" qualifiers="const">
Expand Down
3 changes: 0 additions & 3 deletions scene/main/canvas_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ Transform2D CanvasItem::get_screen_transform() const {
}

Transform2D CanvasItem::get_global_transform() const {
#ifdef DEBUG_ENABLED
ERR_FAIL_COND_V(!is_inside_tree(), get_transform());
#endif
if (global_invalid) {
const CanvasItem *pi = get_parent_item();
if (pi) {
Expand Down