Skip to content

Commit

Permalink
fix for bug #1756
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11041 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 11, 2009
1 parent ad3849a commit b180864
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/qgsnewconnection.cpp
Expand Up @@ -31,7 +31,7 @@ extern "C"
}

QgsNewConnection::QgsNewConnection( QWidget *parent, const QString& connName, Qt::WFlags fl )
: QDialog( parent, fl )
: QDialog( parent, fl ), mOriginalConnName( connName )
{
setupUi( this );

Expand Down Expand Up @@ -141,6 +141,11 @@ void QgsNewConnection::saveConnection()
QSettings settings;
QString baseKey = "/PostgreSQL/connections/";
settings.setValue( baseKey + "selected", txtName->text() );
//delete original entry first
if ( !mOriginalConnName.isNull() && mOriginalConnName != txtName->text() )
{
settings.remove( baseKey + mOriginalConnName );
}
baseKey += txtName->text();
settings.setValue( baseKey + "/host", txtHost->text() );
settings.setValue( baseKey + "/database", txtDatabase->text() );
Expand Down

0 comments on commit b180864

Please sign in to comment.