UI: Image Editor: Fix missing 2D cursor in mask edit mode

The 2D cursor should be visible in both mask and uv edit modes.

This was likely and oversight when splitting the image editor
into the UV and Image editors
This commit is contained in:
Aaron Carlisle 2021-08-09 11:52:51 -04:00
parent ff594715b8
commit fddd5eb692
1 changed files with 11 additions and 2 deletions

View File

@ -211,8 +211,17 @@ static bool is_cursor_visible_2d(const DRWContextState *draw_ctx)
return false;
}
SpaceImage *sima = (SpaceImage *)space_data;
if (sima->mode != SI_MODE_UV) {
return false;
switch (sima->mode) {
case SI_MODE_VIEW:
return false;
break;
case SI_MODE_PAINT:
return false;
break;
case SI_MODE_MASK:
break;
case SI_MODE_UV:
break;
}
return (sima->overlay.flag & SI_OVERLAY_SHOW_OVERLAYS) != 0;
}