diff --git a/src/gui/TimeLineWidget.cpp b/src/gui/TimeLineWidget.cpp index cfb4288c7..a98381b0f 100644 --- a/src/gui/TimeLineWidget.cpp +++ b/src/gui/TimeLineWidget.cpp @@ -88,6 +88,7 @@ TimeLineWidget::TimeLineWidget( const int xoff, const int yoff, const float ppt, m_xOffset -= s_posMarkerPixmap->width() / 2; + setMouseTracking(true); m_pos.m_timeLine = this; QTimer * updateTimer = new QTimer( this ); @@ -365,6 +366,7 @@ void TimeLineWidget::mousePressEvent( QMouseEvent* event ) void TimeLineWidget::mouseMoveEvent( QMouseEvent* event ) { + parentWidget()->update(); // essential for widgets that this timeline had taken their mouse move event from. const MidiTime t = m_begin + static_cast( qMax( event->x() - m_xOffset - m_moveXOff, 0 ) * MidiTime::ticksPerTact() / m_ppt ); switch( m_action ) diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index fafb83d0d..5e8ea8a0a 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -430,8 +430,8 @@ void AutomationEditor::leaveEvent(QEvent * e ) { QApplication::restoreOverrideCursor(); } - QWidget::leaveEvent( e ); + update(); } @@ -1510,8 +1510,11 @@ void AutomationEditor::paintEvent(QPaintEvent * pe ) case SELECT: cursor = s_toolSelect; break; case MOVE: cursor = s_toolMove; break; } - p.drawPixmap( mapFromGlobal( QCursor::pos() ) + QPoint( 8, 8 ), - *cursor ); + QPoint mousePosition = mapFromGlobal( QCursor::pos() ); + if( cursor != NULL && mousePosition.y() > TOP_MARGIN + SCROLLBAR_SIZE) + { + p.drawPixmap( mousePosition + QPoint( 8, 8 ), *cursor ); + } } diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 5b306a783..b65a6b56b 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -1297,6 +1297,7 @@ void PianoRoll::leaveEvent(QEvent * e ) QWidget::leaveEvent( e ); s_textFloat->hide(); + update(); // cleaning inner mouse-related graphics } @@ -3167,10 +3168,10 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) case ModeSelect: cursor = s_toolSelect; break; case ModeEditDetuning: cursor = s_toolOpen; break; } - if( cursor != NULL ) + QPoint mousePosition = mapFromGlobal( QCursor::pos() ); + if( cursor != NULL && mousePosition.y() > keyAreaTop() && mousePosition.x() > noteEditLeft()) { - p.drawPixmap( mapFromGlobal( QCursor::pos() ) + QPoint( 8, 8 ), - *cursor ); + p.drawPixmap( mousePosition + QPoint( 8, 8 ), *cursor ); } }