Commit: 8dd941cac0bc7b230a986975f28b48c1235875c2
Author: Sergey Sharybin
Date:   Mon Feb 15 14:14:46 2021 +0100
Branches: master
https://developer.blender.org/rB8dd941cac0bc7b230a986975f28b48c1235875c2

Tracking: Fix "Lock to Selection" option from header causing jump

This change makes the behavior consistent between shortcut and
option from space clip's header.

The only caveat is that the "Lock to Selection" is removed from the
Display popover. This is because it is rather hard to make operator
to render same as regular checkbox. However, shouldn't be a problem
because the setting in popover was redundant.

Differential Revision: https://developer.blender.org/D10423

===================================================================

M       release/scripts/startup/bl_ui/space_clip.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_clip.py 
b/release/scripts/startup/bl_ui/space_clip.py
index 926be1ff820..ca7f9cdc100 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -113,7 +113,6 @@ class CLIP_PT_clip_display(Panel):
         row = layout.row()
         col = row.column()
         col.prop(sc.clip_user, "use_render_undistorted", text="Render 
Undistorted")
-        col.prop(sc, "lock_selection", text="Lock to Selection")
         col = row.column()
         col.prop(sc, "show_stable", text="Show Stable")
         col.prop(sc, "show_grid", text="Grid")
@@ -190,7 +189,7 @@ class CLIP_HT_header(Header):
                 row.prop(sc, "pivot_point", text="", icon_only=True)
                 row = layout.row(align=True)
                 icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED'
-                row.prop(sc, "lock_selection", icon=icon, text="")
+                row.operator("clip.lock_selection_toggle", icon=icon, text="", 
depress=sc.lock_selection)
                 row.popover(panel='CLIP_PT_display')
 
             elif sc.view == 'GRAPH':
@@ -250,7 +249,7 @@ class CLIP_HT_header(Header):
             row.popover(panel='CLIP_PT_mask_display')
             row = layout.row(align=True)
             icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED'
-            row.prop(sc, "lock_selection", icon=icon, text="")
+            row.operator("clip.lock_selection_toggle", icon=icon, text="", 
depress=sc.lock_selection)
             row.popover(panel='CLIP_PT_display')
 
     def draw(self, context):

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to