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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Inch <mythologylover75@gmail.com>2022-08-12 11:49:35 +0300
committerRyan Inch <mythologylover75@gmail.com>2022-08-12 11:49:35 +0300
commitaf8d747d00ac10b2196bf81295ce5f730be9af6a (patch)
treea40e9889fe18fb37a88872bafa0cd1148dc81121 /object_collection_manager/cm_init.py
parent715015fd658e203d8344ac252a2730150f4606aa (diff)
Collection Manager: Fix T100326. Task: T69577
Add guards to the functions triggered by checkbox updates in the preferences. This prevents them from being called multiple times, such as when the mouse is hovered over the checkbox and the backspace key is repeatedly pressed.
Diffstat (limited to 'object_collection_manager/cm_init.py')
-rw-r--r--object_collection_manager/cm_init.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/object_collection_manager/cm_init.py b/object_collection_manager/cm_init.py
index 38080cb8..679d8d3e 100644
--- a/object_collection_manager/cm_init.py
+++ b/object_collection_manager/cm_init.py
@@ -144,6 +144,10 @@ def disable_objects_menu_addition(self, context):
def register_disable_objects_hotkeys():
+ if addon_disable_objects_hotkey_keymaps:
+ # guard to handle default value updates (mouse hover + backspace)
+ return
+
wm = bpy.context.window_manager
if wm.keyconfigs.addon: # not present when started with --background
km = wm.keyconfigs.addon.keymaps.new(name='Object Mode')