mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 11:32:13 +00:00
Merge pull request #96708 from bruvzg/lbl3d_os
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
[Label3D] Fix updating labels in subvieports on oversampling change.
This commit is contained in:
commit
83d54ab2ad
@ -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);
|
||||
|
@ -1223,6 +1223,7 @@ void Window::_update_viewport_size() {
|
||||
TS->font_set_global_oversampling(font_oversampling);
|
||||
if (!ci_updated) {
|
||||
update_canvas_items();
|
||||
emit_signal(SNAME("size_changed"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user