File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,19 +74,25 @@ def load_default_values(self):
7474 WidgetSettings ('liDbConnection' , 'connection' ),
7575 WidgetSettings ('liDbSchema' , 'schema' ),
7676 ]
77- is_postgis = settings .value ("cadastre/databaseType" , type = str , defaultValue = '' ) == 'postgis'
77+ # Default to PostGIS ticket #302
78+ is_postgis = settings .value ("cadastre/databaseType" , type = str , defaultValue = 'postgis' ) == 'postgis'
7879 for widget in widgets :
79-
80+ # Widgets are ordered by hierarchy, so we quit the loop as soon as a value is not correct
8081 if widget .settings == 'schema' and not is_postgis :
8182 return
8283
8384 if not hasattr (self .dialog , widget .ui ):
8485 return
86+
8587 value = settings .value ("cadastre/" + widget .settings , type = str , defaultValue = '' )
88+ if not value :
89+ return
90+
8691 combo = getattr (self .dialog , widget .ui )
8792 index = combo .findText (value , Qt .MatchFixedString )
8893 if not index :
8994 return
95+
9096 combo .setCurrentIndex (index )
9197
9298 def updateConnectionList (self ):
You can’t perform that action at this time.
0 commit comments