Commit 5f7c0323 authored by Ell's avatar Ell

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.
parent 6f7d95c2
......@@ -442,7 +442,8 @@ gimp_layer_mode_combo_box_update_model (GimpLayerModeComboBox *combo,
if (gimp_layer_mode_get_for_group (combo->priv->layer_mode,
&new_mode) &&
(gimp_layer_mode_get_context (new_mode) & combo->priv->context))
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), new_mode);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment