Skip to content

Commit

Permalink
Fixed scene drag with space key.
Browse files Browse the repository at this point in the history
  • Loading branch information
lellisls committed Jun 26, 2016
1 parent 1c902f1 commit ffe105e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/graphicsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void GraphicsView::mouseMoveEvent( QMouseEvent *e ) {
}

void GraphicsView::keyPressEvent( QKeyEvent *e ) {
if( e->key( ) & Qt::Key_Space ) {
if( e->key( ) == Qt::Key_Space ) {
_space = true;
QApplication::setOverrideCursor( Qt::ClosedHandCursor );
e->accept( );
Expand All @@ -58,7 +58,7 @@ void GraphicsView::keyPressEvent( QKeyEvent *e ) {


void GraphicsView::keyReleaseEvent( QKeyEvent *e ) {
if( e->key( ) & Qt::Key_Space ) {
if( e->key( ) == Qt::Key_Space ) {
_space = false;
QApplication::restoreOverrideCursor( );
e->accept( );
Expand Down

0 comments on commit ffe105e

Please sign in to comment.