mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Add F2 to rename browser favourite item (#8164)
This commit is contained in:
parent
e4738d4eed
commit
9cad526f24
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user