summaryrefslogtreecommitdiffstats
path: root/scene/3d
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-09-08 15:11:13 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-09-08 15:11:13 +0300
commitbdd511708682ff7ad2d35dd5addcc82c572192ac (patch)
treecb3e57c961e5803bbaa3ee2960bf01111cf152e8 /scene/3d
parent5675c76461e197d3929a1142cfb84ab1a76ac9dd (diff)
downloadredot-engine-bdd511708682ff7ad2d35dd5addcc82c572192ac.tar.gz
[Label3D] Fix updating labels in subvieports on oversampling change.
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/label_3d.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/3d/label_3d.cpp b/scene/3d/label_3d.cpp
index 9330cd8b65..6b3510a72a 100644
--- a/scene/3d/label_3d.cpp
+++ b/scene/3d/label_3d.cpp
@@ -30,7 +30,7 @@
#include "label_3d.h"
-#include "scene/main/viewport.h"
+#include "scene/main/window.h"
#include "scene/resources/theme.h"
#include "scene/theme/theme_db.h"
@@ -197,14 +197,14 @@ void Label3D::_notification(int p_what) {
if (!pending_update) {
_im_update();
}
- Viewport *viewport = get_viewport();
- ERR_FAIL_NULL(viewport);
- viewport->connect("size_changed", callable_mp(this, &Label3D::_font_changed));
+ Window *window = get_window();
+ ERR_FAIL_NULL(window);
+ window->connect("size_changed", callable_mp(this, &Label3D::_font_changed));
} break;
case NOTIFICATION_EXIT_TREE: {
- Viewport *viewport = get_viewport();
- ERR_FAIL_NULL(viewport);
- viewport->disconnect("size_changed", callable_mp(this, &Label3D::_font_changed));
+ Window *window = get_window();
+ ERR_FAIL_NULL(window);
+ window->disconnect("size_changed", callable_mp(this, &Label3D::_font_changed));
} break;
case NOTIFICATION_TRANSLATION_CHANGED: {
String new_text = atr(text);