fix [#25015] Ctrl+L linking to scene list does not scroll when the list is larger than screen resolution

This commit is contained in:
Campbell Barton 2010-12-02 22:58:23 +00:00
parent cbab6a742f
commit 9e5577db47
4 changed files with 18 additions and 3 deletions

View File

@ -202,7 +202,12 @@ class SEQUENCER_MT_add(bpy.types.Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
layout.column()
layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text="Scene...")
if len(bpy.data.scenes) > 10:
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("sequencer.scene_strip_add", text="Scene...")
else:
layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text="Scene...")
layout.operator("sequencer.movie_strip_add", text="Movie")
layout.operator("sequencer.image_strip_add", text="Image")
layout.operator("sequencer.sound_strip_add", text="Sound")

View File

@ -916,8 +916,14 @@ class VIEW3D_MT_make_links(bpy.types.Menu):
def draw(self, context):
layout = self.layout
layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...")
layout.operator_menu_enum("marker.make_links_scene", "scene", text="Markers to Scene...")
if(len(bpy.data.scenes) > 10):
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY')
layout.operator("object.make_links_scene", text="Markers to Scene...", icon='OUTLINER_OB_EMPTY')
else:
layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...")
layout.operator_menu_enum("marker.make_links_scene", "scene", text="Markers to Scene...")
layout.operator_enums("object.make_links_data", "type") # inline

View File

@ -1313,6 +1313,7 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot)
ot->idname= "OBJECT_OT_make_links_scene";
/* api callbacks */
ot->invoke= WM_enum_search_invoke;
ot->exec= make_links_scene_exec;
/* better not run the poll check */

View File

@ -253,6 +253,9 @@ static int sequencer_add_scene_strip_invoke(bContext *C, wmOperator *op, wmEvent
return OPERATOR_CANCELLED;
}
if(!RNA_property_is_set(op->ptr, "scene"))
return WM_enum_search_invoke(C, op, event);
sequencer_generic_invoke_xy__internal(C, op, event, 0);
return sequencer_add_scene_strip_exec(C, op);
// needs a menu