summaryrefslogtreecommitdiff
path: root/scene/resources/text_line.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-11-07 10:01:37 +0100
committerGitHub <noreply@github.com>2022-11-07 10:01:37 +0100
commit2c8498c8a6b242141201319af3021c878784c15c (patch)
treedd21c77746f1e56d9401c7db3c84e8e03528a46a /scene/resources/text_line.cpp
parentbb5b45e95035e1e7ab9d7892553339dff260ff95 (diff)
parent18978881fef542f47b4bc34508ef21607f35f49e (diff)
Merge pull request #68351 from Sauermann/fix-code-simplifications
Code simplifications
Diffstat (limited to 'scene/resources/text_line.cpp')
-rw-r--r--scene/resources/text_line.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/scene/resources/text_line.cpp b/scene/resources/text_line.cpp
index ca1cd54349..afab44834d 100644
--- a/scene/resources/text_line.cpp
+++ b/scene/resources/text_line.cpp
@@ -317,11 +317,7 @@ float TextLine::get_width() const {
Size2 TextLine::get_size() const {
const_cast<TextLine *>(this)->_shape();
- if (TS->shaped_text_get_orientation(rid) == TextServer::ORIENTATION_HORIZONTAL) {
- return Size2(TS->shaped_text_get_size(rid).x, TS->shaped_text_get_size(rid).y);
- } else {
- return Size2(TS->shaped_text_get_size(rid).x, TS->shaped_text_get_size(rid).y);
- }
+ return TS->shaped_text_get_size(rid);
}
float TextLine::get_line_ascent() const {