mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Enable up/down arrow key navigation of browser application data layers
This commit is contained in:
parent
4c335826b7
commit
cfc8bdc97a
@ -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 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user