Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Edit/TrackInterface.py
diff options
context:
space:
mode:
authoramartin <olpc@localhost.localdomain>2007-02-20 20:17:00 (GMT)
committer amartin <olpc@localhost.localdomain>2007-02-20 20:17:00 (GMT)
commit6c4c9d007155429051913b79c17ca0c1e5c20a9b (patch)
tree3e2e928e73d6d676e4d364522c4001ace310c666 /Edit/TrackInterface.py
parent16cc50c2a811234429fc00b139a537cb5281ae61 (diff)
playback stuff and tuneInterface fixes
Diffstat (limited to 'Edit/TrackInterface.py')
-rw-r--r--Edit/TrackInterface.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/Edit/TrackInterface.py b/Edit/TrackInterface.py
index b5036cb..c83bfed 100644
--- a/Edit/TrackInterface.py
+++ b/Edit/TrackInterface.py
@@ -76,6 +76,7 @@ class TrackInterface( gtk.EventBox ):
self.pasteTrack = -1
self.pasteRect = False
+ self.playheadT = 0
self.playheadX = Config.TRACK_SPACING_DIV2
self.cursor = { \
@@ -241,10 +242,15 @@ class TrackInterface( gtk.EventBox ):
if self.curAction == "paste":
self._updateClipboardArea()
+ def getPlayhead( self ):
+ return self.playheadT
+
def setPlayhead( self, ticks ):
- self.invalidate_rect( self.playheadX-Config.PLAYHEAD_SIZE/2, 0, Config.PLAYHEAD_SIZE, self.height, self.curPage, False )
- self.playheadX = self.ticksToPixels( self.curBeats, ticks ) + Config.TRACK_SPACING_DIV2
- self.invalidate_rect( self.playheadX-Config.PLAYHEAD_SIZE/2, 0, Config.PLAYHEAD_SIZE, self.height, self.curPage, False )
+ if self.playheadT != ticks:
+ self.invalidate_rect( self.playheadX-Config.PLAYHEAD_SIZE/2, 0, Config.PLAYHEAD_SIZE, self.height, self.curPage, False )
+ self.playheadX = self.ticksToPixels( self.curBeats, ticks ) + Config.TRACK_SPACING_DIV2
+ self.invalidate_rect( self.playheadX-Config.PLAYHEAD_SIZE/2, 0, Config.PLAYHEAD_SIZE, self.height, self.curPage, False )
+ self.playheadT = ticks
def setInterfaceMode( self, mode ):
self.doneCurrentAction()