mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 06:03:38 +00:00
Simplify always true conditional
get_viewport() is always true, because is_inside_tree() is true.
This commit is contained in:
parent
b1fbd8ab40
commit
7451fa63f2
@ -995,12 +995,7 @@ Transform2D CanvasItem::get_viewport_transform() const {
|
||||
ERR_FAIL_COND_V(!is_inside_tree(), Transform2D());
|
||||
|
||||
if (canvas_layer) {
|
||||
if (get_viewport()) {
|
||||
return get_viewport()->get_final_transform() * canvas_layer->get_transform();
|
||||
} else {
|
||||
return canvas_layer->get_transform();
|
||||
}
|
||||
|
||||
return get_viewport()->get_final_transform() * canvas_layer->get_transform();
|
||||
} else {
|
||||
return get_viewport()->get_final_transform() * get_viewport()->get_canvas_transform();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user