Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add F2 to rename browser favourite item (#8164)
- Loading branch information
|
@@ -136,6 +136,9 @@ Connections changed in the browser |
|
|
Show event override |
|
|
%End |
|
|
|
|
|
virtual void keyPressEvent( QKeyEvent *event ); |
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
@@ -157,6 +157,15 @@ void QgsBrowserDockWidget::showEvent( QShowEvent *e ) |
|
|
QgsDockWidget::showEvent( e ); |
|
|
} |
|
|
|
|
|
void QgsBrowserDockWidget::keyPressEvent( QKeyEvent *event ) |
|
|
{ |
|
|
if ( event->key() == Qt::Key_F2 ) |
|
|
{ |
|
|
renameFavorite(); |
|
|
event->accept(); |
|
|
} |
|
|
} |
|
|
|
|
|
void QgsBrowserDockWidget::itemDoubleClicked( const QModelIndex &index ) |
|
|
{ |
|
|
QgsDataItem *item = mModel->dataItem( mProxyModel->mapToSource( index ) ); |
|
|
|
@@ -110,6 +110,8 @@ class GUI_EXPORT QgsBrowserDockWidget : public QgsDockWidget, private Ui::QgsBro |
|
|
//! Show event override |
|
|
void showEvent( QShowEvent *event ) override; |
|
|
|
|
|
void keyPressEvent( QKeyEvent *event ) override; |
|
|
|
|
|
private slots: |
|
|
void itemDoubleClicked( const QModelIndex &index ); |
|
|
void renameFavorite(); |
|
|