app: when changing layer-mode group, check new mode against context
When changing the layer-mode group in a GimpLayerModeComboBox, check the new mode against the combo's context, and fall back to normal if it's not applicable. This is necessary for the color-erase mode, which has both a legacy and non-legacy variants. The former is applicable for painting contexts, so we want to map the non-legacy mode to it when changing groups, however, it's not applicable for layer contexts, so, in this case, we want to map the non-legacy mode to normal.
Showing with 2 additions and 1 deletion