[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src commands/PlayHeadMove.cpp core/Son...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src commands/PlayHeadMove.cpp core/Son... |
Date: |
Mon, 23 Apr 2007 18:18:42 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/04/23 18:18:42
Modified files:
src/commands : PlayHeadMove.cpp
src/core : Song.cpp
src/traverso/songcanvas: Cursors.cpp
Log message:
* Do not emit the transportPosSet signal until after the seek is
finished.
This way, gui objects will get the correct play position!
* Hide the playhead when the seek is started, and show it again
after the seek is finished. Avoids the playhead painted for a short
amount of
time at the wrong position after a seek was started.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/PlayHeadMove.cpp?cvsroot=traverso&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Song.cpp?cvsroot=traverso&r1=1.81&r2=1.82
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/Cursors.cpp?cvsroot=traverso&r1=1.18&r2=1.19
Patches:
Index: commands/PlayHeadMove.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/PlayHeadMove.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- commands/PlayHeadMove.cpp 17 Apr 2007 19:56:45 -0000 1.3
+++ commands/PlayHeadMove.cpp 23 Apr 2007 18:18:42 -0000 1.4
@@ -42,7 +42,12 @@
if (x < 0) {
x = 0;
}
- m_cursor->set_active(m_song->is_transporting());
+ // if the song is transporting, the seek action will cause
+ // the playcursor to be moved to the correct location.
+ // Until then hide it, it will be shown again when the seek is finished!
+ if (m_song->is_transporting()) {
+ m_cursor->hide();
+ }
m_song->set_transport_pos( (nframes_t) (x * m_sv->scalefactor));
m_sv->start_shuttle(false);
return -1;
Index: core/Song.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Song.cpp,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- core/Song.cpp 22 Apr 2007 20:05:38 -0000 1.81
+++ core/Song.cpp 23 Apr 2007 18:18:42 -0000 1.82
@@ -519,7 +519,6 @@
}
seeking = 1;
- emit transportPosSet();
}
@@ -564,6 +563,7 @@
resumeTransport = false;
}
+ emit transportPosSet();
PMESG2("Song :: leaving seek_finished");
}
Index: traverso/songcanvas/Cursors.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/Cursors.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- traverso/songcanvas/Cursors.cpp 23 Apr 2007 17:56:53 -0000 1.18
+++ traverso/songcanvas/Cursors.cpp 23 Apr 2007 18:18:42 -0000 1.19
@@ -116,6 +116,11 @@
void PlayHead::enable_follow()
{
m_followDisabled = false;
+ // This function is called after the song finished a seek action.
+ // if the song is still playing, update our position, and start moving
again!
+ if (m_song->is_transporting()) {
+ play_start();
+ }
}
void PlayHead::update_position()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src commands/PlayHeadMove.cpp core/Son...,
Remon Sijrier <=