[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/core Song.cpp
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/core Song.cpp |
Date: |
Sat, 29 Dec 2007 21:40:25 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/12/29 21:40:25
Modified files:
src/core : Song.cpp
Log message:
get_last_location() semantics are not good, it is supposed to give the
'end of the audible location in the sheet'
fix for now when no markers are there
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Song.cpp?cvsroot=traverso&r1=1.166&r2=1.167
Patches:
Index: Song.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Song.cpp,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -b -r1.166 -r1.167
--- Song.cpp 29 Dec 2007 03:00:25 -0000 1.166
+++ Song.cpp 29 Dec 2007 21:40:25 -0000 1.167
@@ -1054,9 +1054,13 @@
const TimeRef& Song::get_last_location() const
{
TimeRef lastAudio = m_acmanager->get_last_location();
- TimeRef lastMarker = m_timeline->get_markers().last()->get_when();
+ if (m_timeline->get_markers().size()) {
+ TimeRef lastMarker =
m_timeline->get_markers().last()->get_when();
return (lastAudio > lastMarker) ? lastAudio : lastMarker;
+ }
+
+ return lastAudio;
}
void Song::private_add_track(Track* track)