Issue #11808: The RGBA channels cannot be duplicated anymore or used with…

… the selection commands.
This commit is contained in:
Jehan 2024-09-15 17:14:37 +02:00
parent d225d58a22
commit 12370d7dab
2 changed files with 9 additions and 6 deletions

View File

@ -383,7 +383,6 @@ channels_duplicate_cmd_callback (GimpAction *action,
GimpImage *image = NULL; GimpImage *image = NULL;
GList *channels; GList *channels;
GimpChannel *parent = GIMP_IMAGE_ACTIVE_PARENT; GimpChannel *parent = GIMP_IMAGE_ACTIVE_PARENT;
return_if_no_channels (image, channels, data);
if (GIMP_IS_COMPONENT_EDITOR (data)) if (GIMP_IS_COMPONENT_EDITOR (data))
{ {
@ -392,6 +391,8 @@ channels_duplicate_cmd_callback (GimpAction *action,
const gchar *desc; const gchar *desc;
gchar *name; gchar *name;
return_if_no_image (image, data);
component = GIMP_COMPONENT_EDITOR (data)->clicked_component; component = GIMP_COMPONENT_EDITOR (data)->clicked_component;
gimp_enum_get_value (GIMP_TYPE_CHANNEL_TYPE, component, gimp_enum_get_value (GIMP_TYPE_CHANNEL_TYPE, component,
@ -415,6 +416,8 @@ channels_duplicate_cmd_callback (GimpAction *action,
GList *new_channels = NULL; GList *new_channels = NULL;
GList *iter; GList *iter;
return_if_no_channels (image, channels, data);
channels = g_list_copy (channels); channels = g_list_copy (channels);
gimp_image_undo_group_start (image, gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_CHANNEL_ADD, GIMP_UNDO_GROUP_CHANNEL_ADD,

View File

@ -23,14 +23,14 @@
<item><attribute name="action">app.channels-new</attribute></item> <item><attribute name="action">app.channels-new</attribute></item>
<item><attribute name="action">app.channels-raise</attribute></item> <item><attribute name="action">app.channels-raise</attribute></item>
<item><attribute name="action">app.channels-lower</attribute></item> <item><attribute name="action">app.channels-lower</attribute></item>
<item><attribute name="action">app.channels-duplicate</attribute></item> <item><attribute name="action">channels.channels-duplicate</attribute></item>
<item><attribute name="action">app.channels-delete</attribute></item> <item><attribute name="action">app.channels-delete</attribute></item>
</section> </section>
<section> <section>
<item><attribute name="action">app.channels-selection-replace</attribute></item> <item><attribute name="action">channels.channels-selection-replace</attribute></item>
<item><attribute name="action">app.channels-selection-add</attribute></item> <item><attribute name="action">channels.channels-selection-add</attribute></item>
<item><attribute name="action">app.channels-selection-subtract</attribute></item> <item><attribute name="action">channels.channels-selection-subtract</attribute></item>
<item><attribute name="action">app.channels-selection-intersect</attribute></item> <item><attribute name="action">channels.channels-selection-intersect</attribute></item>
</section> </section>
</submenu> </submenu>
</menu> </menu>