mirror of https://github.com/GNOME/gimp.git
app: do not add undo step when clearing an already empty channel.
See also bug 787545 about single-clicking with a selection tool creating an undo step even when there were already no selections.
This commit is contained in:
parent
0d9a85a207
commit
9c94072213
|
@ -1316,10 +1316,14 @@ gimp_channel_real_clear (GimpChannel *channel,
|
|||
{
|
||||
if (push_undo)
|
||||
{
|
||||
if (! undo_desc)
|
||||
undo_desc = GIMP_CHANNEL_GET_CLASS (channel)->clear_desc;
|
||||
if (! channel->empty)
|
||||
{
|
||||
/* Don't push an undo if the channel was already empty. */
|
||||
if (! undo_desc)
|
||||
undo_desc = GIMP_CHANNEL_GET_CLASS (channel)->clear_desc;
|
||||
|
||||
gimp_channel_push_undo (channel, undo_desc);
|
||||
gimp_channel_push_undo (channel, undo_desc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue