Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Edit/NoteInterface.py
diff options
context:
space:
mode:
authoramartin <olpc@localhost.localdomain>2007-01-29 17:32:53 (GMT)
committer amartin <olpc@localhost.localdomain>2007-01-29 17:32:53 (GMT)
commitea065354331994c37bc0c3b71e526e10e97750bb (patch)
tree07423eb13db40f943d9fca17cf548f98fea21eb7 /Edit/NoteInterface.py
parente1aa8419a4d53e55411777e33a66f8fc173f1a2c (diff)
context buttons first draft
Diffstat (limited to 'Edit/NoteInterface.py')
-rwxr-xr-xEdit/NoteInterface.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/Edit/NoteInterface.py b/Edit/NoteInterface.py
index b3697bf..e927444 100755
--- a/Edit/NoteInterface.py
+++ b/Edit/NoteInterface.py
@@ -40,8 +40,7 @@ class NoteInterface:
self.updateParams( pitch, onset, duration, amplitude )
def destroy( self ):
- # nothing to do?
- return
+ self.parent.invalidate_rect( self.imgX, self.imgY, self.imgWidth, self.imgHeight, self.page, True )
def updateParams( self, pitch, onset, duration, amplitude):
self.pitch = pitch
@@ -92,16 +91,15 @@ class NoteInterface:
self.imgY = self.y - Config.NOTE_IMAGE_PADDING
self.oldPitch = self.pitch
- if self.page == self.parent.curPage:
- if self.firstTransform:
- self.parent.invalidate_rect( self.imgX, self.imgY, self.imgWidth, self.imgHeight, self.page, True )
- self.firstTransform = False
- else:
- x = min( self.imgX, oldX )
- y = min( self.imgY, oldY )
- endx = max( self.imgX + self.imgWidth, oldEndX )
- endy = max( self.imgY, oldY ) + self.imgHeight
- self.parent.invalidate_rect( x, y, endx-x, endy-y, self.page, True )
+ if self.firstTransform:
+ self.parent.invalidate_rect( self.imgX, self.imgY, self.imgWidth, self.imgHeight, self.page, True )
+ self.firstTransform = False
+ else:
+ x = min( self.imgX, oldX )
+ y = min( self.imgY, oldY )
+ endx = max( self.imgX + self.imgWidth, oldEndX )
+ endy = max( self.imgY, oldY ) + self.imgHeight
+ self.parent.invalidate_rect( x, y, endx-x, endy-y, self.page, True )
def updateDragLimits( self, dragLimits, leftBound, rightBound, widthBound, maxRightBound ):
left = leftBound - self.onset