diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-09-21 17:29:38 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-09-21 17:29:38 +0400 |
commit | 1a4b9cd39dd8296f45e28dfc977e4d2ef926f7ff (patch) | |
tree | 12fb562797f2120e785e345d350e349bb16b50af /release | |
parent | d2695c62a2934e4fc7f325aac4e7d0a0a3eb80ca (diff) |
Fix for [#32595] N shortcut (view-properties) is not shown in preview mode in sequence editor.
Main problem was in py UI code (has to set the context to INVOKE_REGION_PREVIEW for the shortcut lookup to succeed).
Also moved the N properties item into SequencerCommon keymap, and removed the View Selected menu entry from preview-only mode View menu (thx to Ejner Fergo for pointing this out).
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 39c892930f4..3c8ef33811b 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -130,12 +130,19 @@ class SEQUENCER_MT_view(Menu): st = context.space_data + if st.view_type in {'PREVIEW'}: + # Specifying the REGION_PREVIEW context is needed in preview-only + # mode, else the lookup for the shortcut will fail in + # wm_keymap_item_find_props() (see #32595). + layout.operator_context = 'INVOKE_REGION_PREVIEW' layout.operator("sequencer.properties", icon='MENU_PANEL') + layout.operator_context = 'INVOKE_DEFAULT' layout.separator() if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: layout.operator("sequencer.view_all", text="View all Sequences") + layout.operator("sequencer.view_selected") if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: layout.operator_context = 'INVOKE_REGION_PREVIEW' layout.operator("sequencer.view_all_preview", text="Fit preview in window") @@ -145,8 +152,6 @@ class SEQUENCER_MT_view(Menu): # # XXX, invokes in the header view # layout.operator("sequencer.view_ghost_border", text="Overlay Border") - layout.operator("sequencer.view_selected") - layout.prop(st, "show_seconds") layout.prop(st, "show_frame_indicator") |