Skip to content

Commit

Permalink
Merge pull request #5249 from boundlessgeo/auth_certs_store_tab
Browse files Browse the repository at this point in the history
[auth] Certs manager remembers (in the settings) the last opened tab
  • Loading branch information
elpaso committed Sep 26, 2017
2 parents f6479c1 + d674390 commit e536cdd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/gui/auth/qgsauthcertificatemanager.sip
Expand Up @@ -27,6 +27,11 @@ class QgsAuthCertEditors : QWidget
\param parent Parent widget
%End

~QgsAuthCertEditors( );
%Docstring
Destructor: store last selected tab
%End

};


Expand Down
9 changes: 9 additions & 0 deletions src/gui/auth/qgsauthcertificatemanager.cpp
Expand Up @@ -15,6 +15,7 @@
***************************************************************************/

#include "qgsauthcertificatemanager.h"
#include "qgssettings.h"

#include <QDialog>
#include <QDialogButtonBox>
Expand All @@ -24,6 +25,14 @@ QgsAuthCertEditors::QgsAuthCertEditors( QWidget *parent )
: QWidget( parent )
{
setupUi( this );
QgsSettings settings;
tabWidget->setCurrentIndex( settings.value( QStringLiteral( "AuthCertEditorsSelectedTab" ), 0, QgsSettings::Section::Auth ).toInt() );
}

QgsAuthCertEditors::~QgsAuthCertEditors()
{
QgsSettings settings;
settings.setValue( QStringLiteral( "AuthCertEditorsSelectedTab" ), tabWidget->currentIndex(), QgsSettings::Section::Auth );
}


Expand Down
5 changes: 5 additions & 0 deletions src/gui/auth/qgsauthcertificatemanager.h
Expand Up @@ -40,6 +40,11 @@ class GUI_EXPORT QgsAuthCertEditors : public QWidget, private Ui::QgsAuthCertMan
*/
explicit QgsAuthCertEditors( QWidget *parent SIP_TRANSFERTHIS = 0 );

/**
* Destructor: store last selected tab
*/
~QgsAuthCertEditors( );

};


Expand Down

0 comments on commit e536cdd

Please sign in to comment.