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:
authorSergey Sharybin <sergey@blender.org>2021-02-15 16:14:46 +0300
committerSergey Sharybin <sergey@blender.org>2021-07-09 11:37:36 +0300
commit8dd941cac0bc7b230a986975f28b48c1235875c2 (patch)
tree2d3f0f02f58b45046b34d93b75d93367c097ff38
parent249a7e230781e06348c70caac2b251dc48d3602b (diff)
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
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py5
1 files changed, 2 insertions, 3 deletions
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):