Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Edit
diff options
context:
space:
mode:
authorOli <olivier.belanger@umontreal.ca>2007-07-12 19:42:58 (GMT)
committer Oli <olivier.belanger@umontreal.ca>2007-07-12 19:42:58 (GMT)
commit9136e973cda3d856c69088e93be95deaed52f096 (patch)
tree1a7adff5917e7e3e1c770254926d4629f4756cb5 /Edit
parent551a760e6d393dc5efec92b102e51f87d4502093 (diff)
parent66aa72d7ec964895474076972b44278c99df0951 (diff)
Merge branch 'master' of git+ssh://olipet@dev.laptop.org/git/projects/tamtam
Diffstat (limited to 'Edit')
-rw-r--r--Edit/MainWindow.py8
-rw-r--r--Edit/TuneInterface.py11
2 files changed, 15 insertions, 4 deletions
diff --git a/Edit/MainWindow.py b/Edit/MainWindow.py
index 3780f10..e9a9690 100644
--- a/Edit/MainWindow.py
+++ b/Edit/MainWindow.py
@@ -801,8 +801,13 @@ class MainWindow( SubActivity ):
if self.playScope == "All":
return
+
+ if self.displayedPage in selectedIds:
+ startPage = self.displayedPage
+ else:
+ startPage = selectedIds[0]
- self._playPages( selectedIds, self.displayedPage, self.trackInterface.getPlayhead() )
+ self._playPages( selectedIds, startPage, self.trackInterface.getPlayhead() )
def updatePagesPlaying( self ):
if not self.playing:
@@ -884,6 +889,7 @@ class MainWindow( SubActivity ):
if (Config.DEBUG > 3):
print 'rebuild note loop'
print 'pages : ', self.pages_playing
+ x = 1/len(self.pages_playing) # make me crash if there are no pages
print 'trackset : ', trackset
print 'numticks : ', numticks
print 'notes : ', len(notes), 'notes'
diff --git a/Edit/TuneInterface.py b/Edit/TuneInterface.py
index 4dfbcbf..f9d686f 100644
--- a/Edit/TuneInterface.py
+++ b/Edit/TuneInterface.py
@@ -411,7 +411,7 @@ class TuneInterface( gtk.EventBox ):
return True # page added to selection
- def deselectPage( self, id, force = False, skip_redraw = False ):
+ def deselectPage( self, id, force = False, skip_redraw = False, noUpdate = False ):
if not id in self.selectedIds: return False # page isn't selected
if not force:
@@ -427,7 +427,8 @@ class TuneInterface( gtk.EventBox ):
ind = self.noteDB.getPageIndex( id )
self.invalidate_rect( self.pageOffset + ind*Config.PAGE_THUMBNAIL_WIDTH, 0, Config.PAGE_THUMBNAIL_WIDTH, self.height )
- self.owner.updatePageSelection( self.selectedIds )
+ if not noUpdate:
+ self.owner.updatePageSelection( self.selectedIds )
return True # page removed from the selection
@@ -471,9 +472,13 @@ class TuneInterface( gtk.EventBox ):
self.updateSize()
def notifyPageDelete( self, which, safe ):
+ if self.displayedPage in which:
+ noUpdate = True
+ else:
+ noUpdate = False
for id in self.selectedIds:
if id in which:
- self.deselectPage( id, True, True )
+ self.deselectPage( id, True, True, noUpdate )
for id in which:
del self.thumbnail[id]
del self.thumbnailDirtyRect[id]