Fix a few more cases where an operator should not show in the search menu.
This commit is contained in:
@@ -34,6 +34,10 @@ class ConsoleExec(Operator):
|
||||
bl_idname = "console.execute"
|
||||
bl_label = "Console Execute"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
@@ -54,6 +58,10 @@ class ConsoleAutocomplete(Operator):
|
||||
bl_idname = "console.autocomplete"
|
||||
bl_label = "Console Autocomplete"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
module = _lang_module_get(sc)
|
||||
@@ -72,6 +80,10 @@ class ConsoleCopyAsScript(Operator):
|
||||
bl_idname = "console.copy_as_script"
|
||||
bl_label = "Copy to Clipboard (as script)"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
@@ -91,6 +103,10 @@ class ConsoleBanner(Operator):
|
||||
bl_idname = "console.banner"
|
||||
bl_label = "Console Banner"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
@@ -119,6 +135,10 @@ class ConsoleLanguage(Operator):
|
||||
maxlen=32,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
|
Reference in New Issue
Block a user