Fix #146262: Transform constraints shown when overlays off

The check to draw transform constraints was returning too early and
skipping the later check for the `V3D_HIDE_OVERLAYS` flag.

This meant that transform constraints (e.g. when moving over X axis)
were always shown even when all overlays were turned off, which can
be very distracting.

Fix it by switching the check, so it returns false if the region is
not the same, but continues happily if it is.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/147132
This commit is contained in:
Pablo Vazquez
2025-10-01 21:42:34 +02:00
committed by Pablo Vazquez
parent 623bf30e4c
commit 1df4a09539

View File

@@ -1546,8 +1546,8 @@ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], floa
static bool transinfo_show_overlay(TransInfo *t, ARegion *region)
{
/* Don't show overlays when not the active view and when overlay is disabled: #57139 */
if (region == t->region) {
return true;
if (region != t->region) {
return false;
}
if (t->spacetype == SPACE_VIEW3D) {