@@ -117,6 +117,8 @@ QgsPgSourceSelect::QgsPgSourceSelect( QWidget *parent, Qt::WFlags fl )
117
117
mSearchModeComboBox ->setVisible ( false );
118
118
mSearchModeLabel ->setVisible ( false );
119
119
mSearchTableEdit ->setVisible ( false );
120
+
121
+ cbxAllowGeometrylessTables->setDisabled ( true );
120
122
}
121
123
/* * Autoconnected SLOTS **/
122
124
// Slot for adding a new connection
@@ -147,6 +149,7 @@ void QgsPgSourceSelect::on_btnDelete_clicked()
147
149
settings.remove ( key + " /sslmode" );
148
150
settings.remove ( key + " /publicOnly" );
149
151
settings.remove ( key + " /geometryColumnsOnly" );
152
+ settings.remove ( key + " /allowGeometrylessTables" );
150
153
settings.remove ( key + " /estimatedMetadata" );
151
154
settings.remove ( key + " /saveUsername" );
152
155
settings.remove ( key + " /savePassword" );
@@ -194,6 +197,15 @@ void QgsPgSourceSelect::on_cmbConnections_activated( int )
194
197
// Remember which database was selected.
195
198
QSettings settings;
196
199
settings.setValue ( " /PostgreSQL/connections/selected" , cmbConnections->currentText () );
200
+
201
+ cbxAllowGeometrylessTables->blockSignals ( true );
202
+ cbxAllowGeometrylessTables->setChecked ( settings.value ( " /PostgreSQL/connections/" + cmbConnections->currentText () + " /allowGeometrylessTables" , false ).toBool () );
203
+ cbxAllowGeometrylessTables->blockSignals ( false );
204
+ }
205
+
206
+ void QgsPgSourceSelect::on_cbxAllowGeometrylessTables_stateChanged ( int )
207
+ {
208
+ on_btnConnect_clicked ();
197
209
}
198
210
199
211
void QgsPgSourceSelect::on_btnBuildQuery_clicked ()
@@ -410,6 +422,8 @@ void QgsPgSourceSelect::addTables()
410
422
411
423
void QgsPgSourceSelect::on_btnConnect_clicked ()
412
424
{
425
+ cbxAllowGeometrylessTables->setEnabled ( true );
426
+
413
427
if ( mColumnTypeThread )
414
428
{
415
429
mColumnTypeThread ->stop ();
@@ -444,7 +458,7 @@ void QgsPgSourceSelect::on_btnConnect_clicked()
444
458
445
459
bool searchPublicOnly = settings.value ( key + " /publicOnly" ).toBool ();
446
460
bool searchGeometryColumnsOnly = settings.value ( key + " /geometryColumnsOnly" ).toBool ();
447
- bool allowGeometrylessTables = settings. value ( key + " /allowGeometrylessTables " , false ). toBool ();
461
+ bool allowGeometrylessTables = cbxAllowGeometrylessTables-> isChecked ();
448
462
mUseEstimatedMetadata = settings.value ( key + " /estimatedMetadata" ).toBool ();
449
463
// Need to escape the password to allow for single quotes and backslashes
450
464
0 commit comments