Fix #147701: VSE: Can't select markers when scene and sequencer scene differ

Add a simple check to the Marker keymap poll. Since there's no `bContext`
passed to the function we can reconstruct it from the workspace.

We can exit early if there is no sequencer scene (when no markers are
guaranteed). View layer can remain the same since it only applies in the
`SPACE_ACTION` case.

Pull Request: https://projects.blender.org/blender/blender/pulls/147903
This commit is contained in:
John Kiril Swenson
2025-10-16 01:51:01 +02:00
committed by John Kiril Swenson
parent 8a0622ac68
commit 60d0cfdfe4

View File

@@ -4981,8 +4981,21 @@ bool WM_event_handler_region_marker_poll(const wmWindow *win,
break;
}
/* Check for markers in the current scene, noting that the VSE uses a special sequencer scene. */
Scene *scene = WM_window_get_active_scene(win);
if (area->spacetype == SPACE_SEQ) {
WorkSpace *workspace = WM_window_get_active_workspace(win);
if (workspace && workspace->sequencer_scene) {
scene = workspace->sequencer_scene;
}
else {
return false;
}
}
const ListBase *markers = ED_scene_markers_get_from_area(
WM_window_get_active_scene(win), WM_window_get_active_view_layer(win), area);
scene, WM_window_get_active_view_layer(win), area);
if (BLI_listbase_is_empty(markers)) {
return false;
}