Git commit 87b23a1160baab62805548f63ff6bd7873772665 by Jouni Pentik=C3=A4in= en. Committed on 10/08/2015 at 10:00. Pushed by jounip into branch 'krita-animation-pentikainen'. Remove some unused methods M +0 -12 krita/image/kis_keyframe.cpp M +0 -17 krita/image/kis_keyframe.h M +0 -10 krita/image/kis_keyframe_channel.cpp M +0 -1 krita/image/kis_keyframe_channel.h http://commits.kde.org/calligra/87b23a1160baab62805548f63ff6bd7873772665 diff --git a/krita/image/kis_keyframe.cpp b/krita/image/kis_keyframe.cpp index 259f897..ca6124f 100644 --- a/krita/image/kis_keyframe.cpp +++ b/krita/image/kis_keyframe.cpp @@ -73,16 +73,4 @@ KisKeyframeChannel *KisKeyframe::channel() const return m_d->channel; } = -bool KisKeyframe::affects(int time) const -{ - return wouldAffect(time, this->time()); -} - -bool KisKeyframe::wouldAffect(int time, int newTime) const -{ - // TODO: think through corner cases.. - KisKeyframe *nextKey =3D m_d->channel->nextKeyframeAfter(newTime); - return (newTime <=3D time && (!nextKey || time < nextKey->time())); -} - #include "kis_keyframe.moc" diff --git a/krita/image/kis_keyframe.h b/krita/image/kis_keyframe.h index a98a3ab..8c1f42e 100644 --- a/krita/image/kis_keyframe.h +++ b/krita/image/kis_keyframe.h @@ -42,23 +42,6 @@ public: void setTime(int time); KisKeyframeChannel *channel() const; = - /** - * Returns true if the are no other keyframes between this keyframe an= d the given time. - * Note: if the keyframe is not actually on the channel, pretend it is. - * This may be the case during the handling of key insertion/removal s= ignals. - * @param time time to check against - * @return true if the key is active at the given time - */ - bool affects(int time) const; - - /** - * Same as affects, except we pretend the key has the given time - * @param time time to check against - * @param newTime pretended keyframe time - * @return true if the key would be active at the given time - */ - bool wouldAffect(int time, int newTime) const; - private: struct Private; QScopedPointer m_d; diff --git a/krita/image/kis_keyframe_channel.cpp b/krita/image/kis_keyfram= e_channel.cpp index a01e14b..5d353b0 100644 --- a/krita/image/kis_keyframe_channel.cpp +++ b/krita/image/kis_keyframe_channel.cpp @@ -235,16 +235,6 @@ KisKeyframe *KisKeyframeChannel::activeKeyframeAt(int = time) const return activeKeyIterator(time).value().data(); } = -KisKeyframe *KisKeyframeChannel::nextKeyframeAfter(int time) const -{ - const KeyframesMap keys =3D constKeys(); - KeyframesMap::const_iterator i =3D keys.upperBound(time); - - if (i =3D=3D keys.end()) return 0; - - return i.value().data(); -} - KisTimeRange KisKeyframeChannel::affectedFrames(int time) const { return identicalFrames(time); diff --git a/krita/image/kis_keyframe_channel.h b/krita/image/kis_keyframe_= channel.h index effe796..479dc7a 100644 --- a/krita/image/kis_keyframe_channel.h +++ b/krita/image/kis_keyframe_channel.h @@ -55,7 +55,6 @@ public: = KisKeyframe *keyframeAt(int time); KisKeyframe *activeKeyframeAt(int time) const; - KisKeyframe *nextKeyframeAfter(int time) const; = /** * Get the set of frames affected by any changes to the value