Fix #118765: Show Startup Popup Warning on Main Window
During startup, popup block warnings should be displayed on the main window, not a child window even if it is active. Pull Request: https://projects.blender.org/blender/blender/pulls/119096
This commit is contained in:
parent
90fb838416
commit
49c723e117
@ -3843,6 +3843,11 @@ void wm_test_autorun_warning(bContext *C)
|
||||
wmWindow *win = (wm->winactive) ? wm->winactive : static_cast<wmWindow *>(wm->windows.first);
|
||||
|
||||
if (win) {
|
||||
/* We want this warning on the Main window, not a child window even if active. See #118765. */
|
||||
if (win->parent) {
|
||||
win = win->parent;
|
||||
}
|
||||
|
||||
wmWindow *prevwin = CTX_wm_window(C);
|
||||
CTX_wm_window_set(C, win);
|
||||
UI_popup_block_invoke(C, block_create_autorun_warning, nullptr, nullptr);
|
||||
|
@ -2029,6 +2029,11 @@ void wm_test_opengl_deprecation_warning(bContext *C)
|
||||
"Please contact the developer of the add-on to migrate to use 'gpu' module");
|
||||
|
||||
if (win) {
|
||||
/* We want this warning on the Main window, not a child window even if active. See #118765. */
|
||||
if (win->parent) {
|
||||
win = win->parent;
|
||||
}
|
||||
|
||||
wmWindow *prevwin = CTX_wm_window(C);
|
||||
CTX_wm_window_set(C, win);
|
||||
UI_popup_block_invoke(C, block_create_opengl_usage_warning, nullptr, nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user