forked from bartvdbraak/blender
Fix for #21420, Minor bug with editing keymaps
Disable add item button for non-editable keymaps
This commit is contained in:
parent
6bfbffef56
commit
63bc8405fa
@ -1108,7 +1108,7 @@ class USERPREF_PT_input(bpy.types.Panel):
|
|||||||
# "Add New" at end of keymap item list
|
# "Add New" at end of keymap item list
|
||||||
col = self.indented_layout(col, level + 1)
|
col = self.indented_layout(col, level + 1)
|
||||||
subcol = col.split(percentage=0.2).column()
|
subcol = col.split(percentage=0.2).column()
|
||||||
subcol.active = km.user_defined
|
subcol.enabled = km.user_defined
|
||||||
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
|
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
|
||||||
|
|
||||||
col.separator()
|
col.separator()
|
||||||
@ -1308,7 +1308,7 @@ class USERPREF_PT_input(bpy.types.Panel):
|
|||||||
# "Add New" at end of keymap item list
|
# "Add New" at end of keymap item list
|
||||||
col = self.indented_layout(layout, 1)
|
col = self.indented_layout(layout, 1)
|
||||||
subcol = col.split(percentage=0.2).column()
|
subcol = col.split(percentage=0.2).column()
|
||||||
subcol.active = km.user_defined
|
subcol.enabled = km.user_defined
|
||||||
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
|
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
|
||||||
|
|
||||||
def draw_hierarchy(self, defkc, layout):
|
def draw_hierarchy(self, defkc, layout):
|
||||||
|
Loading…
Reference in New Issue
Block a user