fix for error where linking objects to the scene would show the popup if activated from the object menu.

This commit is contained in:
Campbell Barton 2013-01-22 04:54:31 +00:00
parent d1a211188b
commit 3eb41c7a5f

@ -1066,12 +1066,14 @@ class VIEW3D_MT_make_links(Menu):
def draw(self, context):
layout = self.layout
operator_context_default = layout.operator_context
if(len(bpy.data.scenes) > 10):
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY')
else:
layout.operator_context = 'EXEC_REGION_WIN'
layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...")
layout.operator_context = operator_context_default
layout.operator_enum("object.make_links_data", "type") # inline