Changeset View
Changeset View
Standalone View
Standalone View
plugins/dockers/animation/kis_animation_utils.cpp
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 59 | [image, node, channelId, time, copy] () mutable -> KUndo2Command* { | |||
---|---|---|---|---|---|
81 | } else { | 81 | } else { | ||
82 | if (channel->keyframeAt(time) && !createdChannel) { | 82 | if (channel->keyframeAt(time) && !createdChannel) { | ||
83 | if (image->animationInterface()->currentTime() == time && channelId == KisKeyframeChannel::Content.id()) { | 83 | if (image->animationInterface()->currentTime() == time && channelId == KisKeyframeChannel::Content.id()) { | ||
84 | 84 | | |||
85 | //shortcut: clearing the image instead | 85 | //shortcut: clearing the image instead | ||
86 | KisPaintDeviceSP device = node->paintDevice(); | 86 | KisPaintDeviceSP device = node->paintDevice(); | ||
87 | if (device) { | 87 | if (device) { | ||
88 | KisTransaction transaction(kundo2_i18n("Clear"), device, cmd.data()); | 88 | KisTransaction transaction(kundo2_i18n("Clear"), device, cmd.data()); | ||
89 | node->setDirty(); | ||||
89 | device->clear(); | 90 | device->clear(); | ||
90 | (void) transaction.endAndTake(); // saved as 'parent' | 91 | (void) transaction.endAndTake(); // saved as 'parent' | ||
91 | result = true; | 92 | result = true; | ||
92 | } | 93 | } | ||
93 | } | 94 | } | ||
94 | } else { | 95 | } else { | ||
95 | channel->addKeyframe(time, cmd.data()); | 96 | channel->addKeyframe(time, cmd.data()); | ||
96 | result = true; | 97 | result = true; | ||
▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines |