[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/core AudioClipManager.cpp
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/core AudioClipManager.cpp |
Date: |
Wed, 27 Jun 2007 13:27:08 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/06/27 13:27:07
Modified files:
src/core : AudioClipManager.cpp
Log message:
return from add/remove_clip if either the clip was allready there, or
the clip isn't in our list!
removing or adding the same clip is more or less a programming error,
but sometimes
it's hard to tell if a clip allready was removed, and doing it twice
shouldn't hurt! (should it ?)
Anyway, it can happen for CopyClip (removing it twice) so let's just
act nicely!
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioClipManager.cpp?cvsroot=traverso&r1=1.14&r2=1.15
Patches:
Index: AudioClipManager.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioClipManager.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- AudioClipManager.cpp 3 Jun 2007 12:56:32 -0000 1.14
+++ AudioClipManager.cpp 27 Jun 2007 13:27:07 -0000 1.15
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- $Id: AudioClipManager.cpp,v 1.14 2007/06/03 12:56:32 ingmar Exp $
+ $Id: AudioClipManager.cpp,v 1.15 2007/06/27 13:27:07 r_sijrier Exp $
*/
#include "AudioClipManager.h"
@@ -51,7 +51,9 @@
PENTER;
if (m_clips.contains(clip)) {
PERROR("Trying to add clip %s, but it's already in my list!!",
QS_C(clip->get_name()));
+ return;
}
+
m_clips.append( clip );
connect(clip, SIGNAL(trackEndFrameChanged()), this,
SLOT(update_last_frame()));
@@ -68,7 +70,9 @@
disconnect(clip, SIGNAL(positionChanged(Snappable*)),
m_song->get_snap_list(), SLOT(mark_dirty(Snappable*)));
if (m_clips.removeAll(clip) == 0) {
PERROR("Clip %s was not in my list, couldn't remove it!!",
QS_C(clip->get_name()));
+ return;
}
+
m_song->get_snap_list()->mark_dirty(clip);
update_last_frame();
resources_manager()->mark_clip_removed(clip);