Merge branch 'stable-1.1'

# Conflicts:
#	include/PianoRoll.h
#	src/gui/editors/PianoRoll.cpp
This commit is contained in:
Lukas W
2015-06-15 10:11:53 +02:00
3 changed files with 17 additions and 0 deletions

View File

@@ -117,6 +117,7 @@ protected:
virtual void paintEvent( QPaintEvent * pe );
virtual void resizeEvent( QResizeEvent * re );
virtual void wheelEvent( QWheelEvent * we );
virtual void focusOutEvent( QFocusEvent * );
int getKey( int y ) const;
static inline void drawNoteRect( QPainter & p, int x, int y,

View File

@@ -3342,6 +3342,19 @@ void PianoRoll::wheelEvent(QWheelEvent * we )
void PianoRoll::focusOutEvent( QFocusEvent * )
{
for( int i = 0; i < NumKeys; ++i )
{
m_pattern->instrumentTrack()->pianoModel()->midiEventProcessor()->processInEvent( MidiEvent( MidiNoteOff, -1, i, 0 ) );
m_pattern->instrumentTrack()->pianoModel()->setKeyState( i, false );
}
update();
}
int PianoRoll::getKey(int y ) const
{
int key_line_y = keyAreaBottom() - 1;

View File

@@ -1669,6 +1669,7 @@ void InstrumentTrackWindow::dropEvent( QDropEvent* event )
Engine::getSong()->setModified();
event->accept();
setFocus();
}
else if( type == "presetfile" )
{
@@ -1680,6 +1681,7 @@ void InstrumentTrackWindow::dropEvent( QDropEvent* event )
Engine::getSong()->setModified();
event->accept();
setFocus();
}
else if( type == "pluginpresetfile" )
{
@@ -1694,6 +1696,7 @@ void InstrumentTrackWindow::dropEvent( QDropEvent* event )
i->loadFile( value );
event->accept();
setFocus();
}
}