Skip to content
Permalink
Browse files

Enable up/down arrow key navigation of browser application data layers

  • Loading branch information
dakcarto committed Sep 25, 2012
1 parent 4c33582 commit cfc8bdc97a0b17cd30511dc1c93c1e370a9b061c
Showing with 14 additions and 0 deletions.
  1. +13 −0 src/browser/qgsbrowser.cpp
  2. +1 −0 src/browser/qgsbrowser.h
@@ -375,6 +375,19 @@ void QgsBrowser::keyPressEvent( QKeyEvent * e )
}
}

void QgsBrowser::keyReleaseEvent( QKeyEvent * e )
{
QgsDebugMsg( "Entered" );
if ( treeView->hasFocus() && ( e->key() == Qt::Key_Up || e->key() == Qt::Key_Down ) )
{
itemClicked( treeView->selectionModel()->currentIndex() );
}
else
{
e->ignore();
}
}

void QgsBrowser::stopRendering()
{
// you might have seen this already in QgisApp
@@ -59,6 +59,7 @@ class QgsBrowser : public QMainWindow, private Ui::QgsBrowserBase

protected:
void keyPressEvent( QKeyEvent * e );
void keyReleaseEvent( QKeyEvent * e );

bool layerClicked( QgsLayerItem* ptr );

0 comments on commit cfc8bdc

Please sign in to comment.
You can’t perform that action at this time.