From ed870f87b94224c195cbe2df14445e4808b7b5f3 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 20 Jul 2020 19:46:08 +0200 Subject: Fix weird placement of "Motion Tracking" in 3D View overlay popup There was a weird looking gap between the checkbox and the "Motion Tracking" label. Plus, the label could not be clicked to change the value, unlike usually. Issue is that the row is actually a sub-panel header. The checkbox being drawn with the draw_header() callback, and the label being added as separate item by the popover panel code. This adds a hack so the checkbox can add the panel label itself (the popup drawing skips adding the label then). That addresses mentioned issues. --- release/scripts/startup/bl_ui/space_view3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui/space_view3d.py') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index b3ca6f1c3fe..3a5efc30f50 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -6153,7 +6153,7 @@ class VIEW3D_PT_overlay_motion_tracking(Panel): def draw_header(self, context): view = context.space_data - self.layout.prop(view, "show_reconstruction", text="") + self.layout.prop(view, "show_reconstruction", text=self.bl_label) def draw(self, context): layout = self.layout -- cgit v1.2.3