-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index c3e206c..3838e2c 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -119,3 +119,3 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye if ( !qRed( imgMask.pixel( x, y ) ) ) - line[x] = i + 1; + line[x] = button.command + 1; } @@ -340,2 +340,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { Button &button = buttons[ i ]; + Command command = button.command; @@ -343,3 +344,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { // The test to see if the mouse click is inside the button or not - bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i ); + bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, command ); @@ -348,3 +349,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { toggleButton( button ); - switch (i) { + switch ( command ) { case VolumeUp: @@ -361,2 +362,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { return; + default: break; } @@ -373,3 +375,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { qDebug("mouseEvent %d", i); - handleCommand( static_cast<Command>( i ), button.isDown ); + handleCommand( command, button.isDown ); } |