Fix #118906: conflict with alt hotkey in Vert and Edge Slide operators

This 'alt' hotkey is captured in the modal map
`TFM_MODAL_PASSTHROUGH_NAVIGATE` in order to appear in the header.
But this modal map is not necessary.
This commit is contained in:
Germano Cavalcante
2024-02-29 20:50:09 -03:00
parent 72688791dc
commit 3d6bb6ce04

View File

@@ -712,6 +712,13 @@ static bool transform_modal_item_poll(const wmOperator *op, int value)
break;
}
case TFM_MODAL_PASSTHROUGH_NAVIGATE:
if (ELEM(t->mode, TFM_EDGE_SLIDE, TFM_VERT_SLIDE)) {
/* Returning `false` will not prevent the navigation from working, it will just not display
* the shortcut in the header.
* Return `false` here to prevent this modal item from affecting the state with
* #T_ALT_TRANSFORM used by the Edge and Vert Slide operators. */
return false;
}
return t->vod != nullptr;
}
return true;