Revert "Fix T92464: Operators fail after opening blend files via an operator"
This reverts commit 9bd97e62ad.
This caused T92818.
Event handling relies on checking for NULL window to detect file load in
enough different areas of the code that this isn't a practical solution.
Revert this change in favor of an alternative approach.
This commit is contained in:
@@ -769,18 +769,6 @@ static void wm_file_read_post(bContext *C, const struct wmFileReadPost_Params *p
|
||||
WM_toolsystem_init(C);
|
||||
}
|
||||
}
|
||||
|
||||
/* Keep last. */
|
||||
if (use_data) {
|
||||
if (!G.background) {
|
||||
/* Special case, when calling indirectly (from a Python script for example),
|
||||
* the event loop wont run again to set the active window.
|
||||
* Set the window here to allow scripts to continue running other operations, see: T92464. */
|
||||
if (wm->op_undo_depth > 0) {
|
||||
CTX_wm_window_set(C, wm->windows.first);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
Reference in New Issue
Block a user