Fix #107262: snap source of type Active Element sometimes fails
Remove micro optimization that seeks to reuse the active center alculation. This operation is lightweight and reusing its result only adds an unnecessary dependency.
This commit is contained in:
@@ -1246,13 +1246,7 @@ static void snap_source_active_fn(TransInfo *t)
|
||||
{
|
||||
/* Only need to calculate once */
|
||||
if ((t->tsnap.status & SNAP_SOURCE_FOUND) == 0) {
|
||||
if (t->around == V3D_AROUND_ACTIVE) {
|
||||
/* Just copy the already calculated active center. */
|
||||
copy_v3_v3(t->tsnap.snap_source, t->center_global);
|
||||
TargetSnapOffset(t, nullptr);
|
||||
t->tsnap.status |= SNAP_SOURCE_FOUND;
|
||||
}
|
||||
else if (calculateCenterActive(t, true, t->tsnap.snap_source)) {
|
||||
if (calculateCenterActive(t, true, t->tsnap.snap_source)) {
|
||||
TargetSnapOffset(t, nullptr);
|
||||
t->tsnap.status |= SNAP_SOURCE_FOUND;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user