Fix transform snap mixed with incremental

The incremental was taking priority but the other elements are mandatory.
This commit is contained in:
Germano Cavalcante 2020-11-27 10:51:33 -03:00 committed by Jeroen Bakker
parent 87310c0af1
commit 5d31f404de
2 changed files with 4 additions and 2 deletions

View File

@ -216,8 +216,10 @@ static void applyRotation(TransInfo *t, const int UNUSED(mval[2]))
final = large_rotation_limit(final);
}
else {
transform_snap_increment(t, &final);
applySnapping(t, &final);
if (!(activeSnap(t) && validSnap(t))) {
transform_snap_increment(t, &final);
}
}
t->values_final[0] = final;

View File

@ -391,7 +391,7 @@ static void applyTranslation(TransInfo *t, const int UNUSED(mval[2]))
float incr_dir[3];
mul_v3_m3v3(incr_dir, t->spacemtx_inv, global_dir);
if (transform_snap_increment(t, incr_dir)) {
if (!(activeSnap(t) && validSnap(t)) && transform_snap_increment(t, incr_dir)) {
mul_v3_m3v3(incr_dir, t->spacemtx, incr_dir);
/* Test for mixed snap with grid. */