Revert "app: do not add undo step when clearing an already empty channel."

This reverts commit 9c94072213.

Such things do not belong into the core but into the GUI.
This commit is contained in:
Michael Natterer 2017-11-12 23:42:43 +01:00
parent b5e0dfb6e2
commit 19a28cc709
1 changed files with 3 additions and 7 deletions

View File

@ -1317,14 +1317,10 @@ gimp_channel_real_clear (GimpChannel *channel,
{
if (push_undo)
{
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;
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
{