[Bf-blender-cvs] [a9bf6a3b3ad] blender2.8: UI: hide keymap preferences when filter is used
Campbell Barton
noreply at git.blender.org
Wed Nov 21 21:52:59 CET 2018
Commit: a9bf6a3b3adfce31a230f10c00a0a89cf2d7e985
Author: Campbell Barton
Date: Thu Nov 22 07:52:34 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBa9bf6a3b3adfce31a230f10c00a0a89cf2d7e985
UI: hide keymap preferences when filter is used
===================================================================
M release/scripts/modules/rna_keymap_ui.py
===================================================================
diff --git a/release/scripts/modules/rna_keymap_ui.py b/release/scripts/modules/rna_keymap_ui.py
index a1afca914aa..756dbde23c9 100644
--- a/release/scripts/modules/rna_keymap_ui.py
+++ b/release/scripts/modules/rna_keymap_ui.py
@@ -406,30 +406,31 @@ def draw_keymaps(context, layout):
rowsubsub.alert = True
rowsubsub.prop(spref, "filter_text", text="", icon='VIEWZOOM')
- # When the keyconfig defines it's own preferences.
- kc_prefs = kc_active.preferences
- if kc_prefs is not None:
- box = col.box()
- row = box.row(align=True)
-
- userpref = context.user_preferences
- inputs = userpref.inputs
- show_ui_keyconfig = inputs.show_ui_keyconfig
- row.prop(
- inputs,
- "show_ui_keyconfig",
- text="",
- icon='TRIA_DOWN' if show_ui_keyconfig else 'TRIA_RIGHT',
- emboss=False,
- )
- row.label(text="Preferences")
-
- if show_ui_keyconfig:
- # Defined by user preset, may contain mistakes out of our control.
- try:
- kc_prefs.draw(box)
- except Exception:
- import traceback
- traceback.print_exc()
- del box
- del kc_prefs
+ if not filter_text:
+ # When the keyconfig defines it's own preferences.
+ kc_prefs = kc_active.preferences
+ if kc_prefs is not None:
+ box = col.box()
+ row = box.row(align=True)
+
+ userpref = context.user_preferences
+ inputs = userpref.inputs
+ show_ui_keyconfig = inputs.show_ui_keyconfig
+ row.prop(
+ inputs,
+ "show_ui_keyconfig",
+ text="",
+ icon='TRIA_DOWN' if show_ui_keyconfig else 'TRIA_RIGHT',
+ emboss=False,
+ )
+ row.label(text="Preferences")
+
+ if show_ui_keyconfig:
+ # Defined by user preset, may contain mistakes out of our control.
+ try:
+ kc_prefs.draw(box)
+ except Exception:
+ import traceback
+ traceback.print_exc()
+ del box
+ del kc_prefs
More information about the Bf-blender-cvs
mailing list