Bug fix for inverted vertical scroll bar on Qt TAS piano roll view.

This commit is contained in:
mjbudd77 2021-12-22 20:31:34 -05:00
parent a4d25deaf5
commit f3fd0a8016
1 changed files with 3 additions and 4 deletions

View File

@ -954,7 +954,7 @@ void TasEditorWindow::buildPianoRollDisplay(void)
//pianoRollFrame->setFrameShape( QFrame::StyledPanel ); //pianoRollFrame->setFrameShape( QFrame::StyledPanel );
pianoRollFrame->setFrameShape( QFrame::Box ); pianoRollFrame->setFrameShape( QFrame::Box );
pianoRollVBar->setInvertedControls(true); pianoRollVBar->setInvertedControls(false);
pianoRollVBar->setInvertedAppearance(true); pianoRollVBar->setInvertedAppearance(true);
pianoRoll->setScrollBars( pianoRollHBar, pianoRollVBar ); pianoRoll->setScrollBars( pianoRollHBar, pianoRollVBar );
connect( pianoRollHBar, SIGNAL(valueChanged(int)), pianoRoll, SLOT(hbarChanged(int)) ); connect( pianoRollHBar, SIGNAL(valueChanged(int)), pianoRoll, SLOT(hbarChanged(int)) );
@ -4023,7 +4023,7 @@ int QPianoRoll::calcColumn( int px )
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void QPianoRoll::drawArrow( QPainter *painter, int xl, int yl, int value ) void QPianoRoll::drawArrow( QPainter *painter, int xl, int yl, int value )
{ {
int x, y, w, h, b, b2; int x, y, w, h;
QPoint p[3]; QPoint p[3];
bool hasBookmark = false; bool hasBookmark = false;
bool draw2ndArrow = false; bool draw2ndArrow = false;
@ -4198,7 +4198,7 @@ void QPianoRoll::resizeEvent(QResizeEvent *event)
void QPianoRoll::mouseDoubleClickEvent(QMouseEvent * event) void QPianoRoll::mouseDoubleClickEvent(QMouseEvent * event)
{ {
fceuCriticalSection emuLock; fceuCriticalSection emuLock;
int col, line, row_index, column_index, kbModifiers, alt_pressed; int col, line, column_index, kbModifiers, alt_pressed;
QPoint c = convPixToCursor( event->pos() ); QPoint c = convPixToCursor( event->pos() );
mouse_x = event->pos().x(); mouse_x = event->pos().x();
@ -4207,7 +4207,6 @@ void QPianoRoll::mouseDoubleClickEvent(QMouseEvent * event)
line = lineOffset + c.y(); line = lineOffset + c.y();
col = calcColumn( event->pos().x() ); col = calcColumn( event->pos().x() );
row_index = line;
rowUnderMouse = realRowUnderMouse = line; rowUnderMouse = realRowUnderMouse = line;
columnUnderMouse = column_index = col; columnUnderMouse = column_index = col;