mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
One last tweak to which connection is displayed.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4114 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
d96896cf00
commit
e651ad901b
@ -471,5 +471,14 @@ void QgsDbSourceSelect::setConnectionListPosition()
|
||||
// items as it allows the user to repeatidly click on delete to
|
||||
// remove a whole lot of items).
|
||||
if (!set && cmbConnections->count() > 0)
|
||||
cmbConnections->setCurrentItem(cmbConnections->count()-1);
|
||||
{
|
||||
// If toSelect is null, then the selected connection wasn't found
|
||||
// by QSettings, which probably means that this is the first time
|
||||
// the user has used qgis with database connections, so default to
|
||||
// the first in the list of connetions. Otherwise default to the last.
|
||||
if (toSelect.isNull())
|
||||
cmbConnections->setCurrentItem(0);
|
||||
else
|
||||
cmbConnections->setCurrentItem(cmbConnections->count()-1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user