File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 3030
3131#include " label_3d.h"
3232
33- #include " scene/main/viewport .h"
33+ #include " scene/main/window .h"
3434#include " scene/resources/theme.h"
3535#include " scene/theme/theme_db.h"
3636
@@ -197,14 +197,14 @@ void Label3D::_notification(int p_what) {
197197 if (!pending_update) {
198198 _im_update ();
199199 }
200- Viewport *viewport = get_viewport ();
201- ERR_FAIL_NULL (viewport );
202- viewport ->connect (" size_changed" , callable_mp (this , &Label3D::_font_changed));
200+ Window *window = get_window ();
201+ ERR_FAIL_NULL (window );
202+ window ->connect (" size_changed" , callable_mp (this , &Label3D::_font_changed));
203203 } break ;
204204 case NOTIFICATION_EXIT_TREE: {
205- Viewport *viewport = get_viewport ();
206- ERR_FAIL_NULL (viewport );
207- viewport ->disconnect (" size_changed" , callable_mp (this , &Label3D::_font_changed));
205+ Window *window = get_window ();
206+ ERR_FAIL_NULL (window );
207+ window ->disconnect (" size_changed" , callable_mp (this , &Label3D::_font_changed));
208208 } break ;
209209 case NOTIFICATION_TRANSLATION_CHANGED: {
210210 String new_text = atr (text);
Original file line number Diff line number Diff line change @@ -1224,6 +1224,7 @@ void Window::_update_viewport_size() {
12241224 TS->font_set_global_oversampling (font_oversampling);
12251225 if (!ci_updated) {
12261226 update_canvas_items ();
1227+ emit_signal (SNAME (" size_changed" ));
12271228 }
12281229 }
12291230 }
You can’t perform that action at this time.
0 commit comments