PianoRoll: fixed crash with detune tool

When clicking at an invalid position with the detune tool, LMMS could
crash as an invalid iterator was referenced (closes #2808589).

Furthermore renamed PianoRoll::ModeOpen to PianoRoll::ModeEditDetuning.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 9ca93040de)
This commit is contained in:
Tobias Doerffel
2009-06-18 23:26:15 +02:00
parent 7a632277b8
commit c222c062c5
2 changed files with 9 additions and 18 deletions

View File

@@ -150,7 +150,7 @@ private:
ModeDraw,
ModeErase,
ModeSelect,
ModeOpen,
ModeEditDetuning,
};
enum actions
@@ -311,8 +311,7 @@ private:
void drawDetuningInfo( QPainter & _p, note * _n, int _x, int _y );
bool mouseOverNote( void );
note * noteUnderMouse( void );
NoteVector::const_iterator noteIteratorUnderMouse( void );
// turn a selection rectangle into selected notes
void computeSelectedNotes( bool shift );
void clearSelectedNotes( void );