fixed KEY_PRESSURE-events when changing volume of a note, improved painting of volume-lines

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.3@762 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-03-04 00:55:46 +00:00
parent f94bb2cb66
commit 4037f98441
3 changed files with 15 additions and 3 deletions

View File

@@ -987,6 +987,12 @@ void pianoRoll::updatePaintPixmap( QPixmap & _p )
( *it )->getVolume() / 2,
x + WHITE_KEY_WIDTH + 1,
height() - PR_BOTTOM_MARGIN );
p.drawLine( x + WHITE_KEY_WIDTH-1,
height() - PR_BOTTOM_MARGIN -
( *it )->getVolume() / 2+2,
x + WHITE_KEY_WIDTH + 4,
height() - PR_BOTTOM_MARGIN -
( *it )->getVolume() / 2+2 );
if( ( *it )->hasDetuningInfo() )
{
@@ -1610,7 +1616,7 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
m_currentNote->setVolume( vol );
m_pattern->update();
m_pattern->getInstrumentTrack()->processInEvent(
midiEvent( KEY_PRESSURE, 0, key_num,
midiEvent( KEY_PRESSURE, 0, m_lastKey,
vol * 127 / 100 ),
midiTime() );
}