diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-21 17:43:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-21 17:43:11 +0400 |
commit | e2ebb5d9e413b7dad0d63710ddeacb8e4d03718b (patch) | |
tree | 5e58e5aa28225e30e217d047b134d922746b7bf9 /release/ui | |
parent | 3c5630a63d01771cea247144fd0d31cece46e681 (diff) |
autocomplete poll function wasn't working, added autocomplete in the console header
operator docstrings with newlines and tabs show up as junk in tooltips so just use a single line.
Diffstat (limited to 'release/ui')
-rw-r--r-- | release/ui/space_console.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/release/ui/space_console.py b/release/ui/space_console.py index 136082a285a..980c11b706a 100644 --- a/release/ui/space_console.py +++ b/release/ui/space_console.py @@ -37,6 +37,9 @@ class CONSOLE_HT_header(bpy.types.Header): row = layout.row() row.enabled = sc.show_report_operator row.itemO("console.report_replay") + else: + row = layout.row(align=True) + row.itemO("console.autocomplete", text="Autocomplete") class CONSOLE_MT_console(bpy.types.Menu): __space_type__ = 'CONSOLE' @@ -107,9 +110,7 @@ def get_console(console_id): return namespace, console, stdout, stderr class CONSOLE_OT_exec(bpy.types.Operator): - ''' - Execute the current console line as a python expression. - ''' + '''Execute the current console line as a python expression.''' __idname__ = "console.execute" __label__ = "Console Execute" __register__ = False @@ -384,15 +385,13 @@ def autocomp(bcon): class CONSOLE_OT_autocomplete(bpy.types.Operator): - ''' - Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one. - ''' + '''Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one.''' __idname__ = "console.autocomplete" __label__ = "Console Autocomplete" __register__ = False def poll(self, context): - return context.space_data.type == 'PYTHON' + return context.space_data.console_type == 'PYTHON' def execute(self, context): |