mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
apply enableAutoGeometryRestore to config shortcut dialog
This commit is contained in:
parent
bcbc46b56b
commit
3ca5d72455
@ -33,8 +33,6 @@ Constructor for QgsConfigureShortcutsDialog.
|
||||
singleton QgsShortcutsManager instance.
|
||||
%End
|
||||
|
||||
~QgsConfigureShortcutsDialog();
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent( QKeyEvent *event );
|
||||
|
||||
|
@ -34,6 +34,7 @@ QgsConfigureShortcutsDialog::QgsConfigureShortcutsDialog( QWidget *parent, QgsSh
|
||||
, mManager( manager )
|
||||
{
|
||||
setupUi( this );
|
||||
QgsGui::enableAutoGeometryRestore( this );
|
||||
connect( mLeFilter, &QgsFilterLineEdit::textChanged, this, &QgsConfigureShortcutsDialog::mLeFilter_textChanged );
|
||||
|
||||
if ( !mManager )
|
||||
@ -50,25 +51,6 @@ QgsConfigureShortcutsDialog::QgsConfigureShortcutsDialog( QWidget *parent, QgsSh
|
||||
this, &QgsConfigureShortcutsDialog::actionChanged );
|
||||
|
||||
populateActions();
|
||||
|
||||
restoreState();
|
||||
}
|
||||
|
||||
QgsConfigureShortcutsDialog::~QgsConfigureShortcutsDialog()
|
||||
{
|
||||
saveState();
|
||||
}
|
||||
|
||||
void QgsConfigureShortcutsDialog::saveState()
|
||||
{
|
||||
QgsSettings settings;
|
||||
settings.setValue( QStringLiteral( "Windows/ShortcutsDialog/geometry" ), saveGeometry() );
|
||||
}
|
||||
|
||||
void QgsConfigureShortcutsDialog::restoreState()
|
||||
{
|
||||
QgsSettings settings;
|
||||
restoreGeometry( settings.value( QStringLiteral( "Windows/ShortcutsDialog/geometry" ) ).toByteArray() );
|
||||
}
|
||||
|
||||
void QgsConfigureShortcutsDialog::populateActions()
|
||||
|
@ -47,8 +47,6 @@ class GUI_EXPORT QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsCo
|
||||
*/
|
||||
QgsConfigureShortcutsDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, QgsShortcutsManager *manager = nullptr );
|
||||
|
||||
~QgsConfigureShortcutsDialog() override;
|
||||
|
||||
protected:
|
||||
void keyPressEvent( QKeyEvent *event ) override;
|
||||
void keyReleaseEvent( QKeyEvent *event ) override;
|
||||
@ -68,12 +66,6 @@ class GUI_EXPORT QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsCo
|
||||
|
||||
private:
|
||||
|
||||
//! Saves the dialog window state
|
||||
void saveState();
|
||||
|
||||
//! Restores the dialog window state
|
||||
void restoreState();
|
||||
|
||||
//! Populates the dialog with all actions from the manager
|
||||
void populateActions();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user