Merge pull request #59200 from Sauermann/fix-unused-conditional

Simplify always true conditional
This commit is contained in:
Rémi Verschelde 2022-03-16 23:49:28 +01:00 committed by GitHub
commit cd500eee8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -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();
}