Changeset View
Changeset View
Standalone View
Standalone View
plugins/dockers/animation/kis_animation_utils.cpp
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 75 | if (copy) { | |||
---|---|---|---|---|---|
80 | } | 80 | } | ||
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 | const QRect dirtyRect = device->extent(); | ||||
89 | | ||||
88 | KisTransaction transaction(kundo2_i18n("Clear"), device, cmd.data()); | 90 | KisTransaction transaction(kundo2_i18n("Clear"), device, cmd.data()); | ||
89 | device->clear(); | 91 | device->clear(); | ||
90 | (void) transaction.endAndTake(); // saved as 'parent' | 92 | (void) transaction.endAndTake(); // saved as 'parent' | ||
93 | | ||||
94 | node->setDirty(dirtyRect); | ||||
95 | | ||||
91 | result = true; | 96 | result = true; | ||
92 | } | 97 | } | ||
93 | } | 98 | } | ||
94 | } else { | 99 | } else { | ||
95 | channel->addKeyframe(time, cmd.data()); | 100 | channel->addKeyframe(time, cmd.data()); | ||
96 | result = true; | 101 | result = true; | ||
97 | } | 102 | } | ||
98 | } | 103 | } | ||
▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines |