Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-21 23:52:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-21 23:52:34 +0300
commita9bf6a3b3adfce31a230f10c00a0a89cf2d7e985 (patch)
tree760dad6a9a487d775fa2bb865ddf5242c3c3efd1 /release/scripts/modules
parent360fd9ac2cb7521c881022bd2df440a407f37a1e (diff)
UI: hide keymap preferences when filter is used
Diffstat (limited to 'release/scripts/modules')
-rw-r--r--release/scripts/modules/rna_keymap_ui.py55
1 files changed, 28 insertions, 27 deletions
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