Transform: better contextualize the status bar

`Remove Last Snap Point` should only be displayed when there is a Snap Point to be removed.
This commit is contained in:
Germano Cavalcante 2021-11-16 10:54:50 -03:00
parent b3529ecf0e
commit 0335df9384
1 changed files with 9 additions and 2 deletions

View File

@ -601,8 +601,15 @@ static bool transform_modal_item_poll(const wmOperator *op, int value)
if ((t->tsnap.mode & ~(SCE_SNAP_MODE_INCREMENT | SCE_SNAP_MODE_GRID)) == 0) {
return false;
}
if (!validSnap(t)) {
return false;
if (value == TFM_MODAL_ADD_SNAP) {
if (!validSnap(t)) {
return false;
}
}
else {
if (!t->tsnap.selectedPoint) {
return false;
}
}
break;
}