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).
This commit is contained in:
2012-09-21 13:29:38 +00:00
parent d2695c62a2
commit 1a4b9cd39d
3 changed files with 31 additions and 26 deletions

View File

@@ -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")