Skip to content
Permalink
Browse files

[auth] Certs manager remembers (in the settings) the last opened tab

This is a minor UX/UI change that remembers the latest opened
tab in the certificates manager window
  • Loading branch information
elpaso committed Sep 25, 2017
1 parent 5f11793 commit d6743903e7e4a4120c9af9b85cc9f0f6f9079d75
@@ -27,6 +27,11 @@ class QgsAuthCertEditors : QWidget
\param parent Parent widget
%End

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

};


@@ -15,6 +15,7 @@
***************************************************************************/

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

#include <QDialog>
#include <QDialogButtonBox>
@@ -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 );
}


@@ -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( );

};


0 comments on commit d674390

Please sign in to comment.
You can’t perform that action at this time.