File tree Expand file tree Collapse file tree 2 files changed +28
-5
lines changed
python/plugins/db_manager Expand file tree Collapse file tree 2 files changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -179,9 +179,13 @@ def executeSql(self):
179
179
180
180
def loadSqlLayer (self ):
181
181
uniqueFieldName = self .uniqueCombo .currentText ()
182
- geomFieldName = self .geomCombo .currentText ()
182
+ hasGeomCol = self .hasGeometryCol .checkState () == Qt .Checked
183
+ if hasGeomCol :
184
+ geomFieldName = self .geomCombo .currentText ()
185
+ else :
186
+ geomFieldName = None
183
187
184
- if geomFieldName == "" or uniqueFieldName == "" :
188
+ if ( hasGeomCol and geomFieldName == "" ) or uniqueFieldName == "" :
185
189
QMessageBox .warning (self , self .tr ("DB Manager" ), self .tr (
186
190
"You must fill the required fields: \n geometry column - column with unique integer values" ))
187
191
return
Original file line number Diff line number Diff line change @@ -205,12 +205,15 @@ integer values</string>
205
205
</widget >
206
206
</item >
207
207
<item >
208
- <widget class =" QLabel " name =" label_3 " >
208
+ <widget class =" QCheckBox " name =" hasGeometryCol " >
209
209
<property name =" text" >
210
210
<string >Geometry column</string >
211
211
</property >
212
- <property name =" indent" >
213
- <number >40</number >
212
+ <property name =" checked" >
213
+ <bool >true</bool >
214
+ </property >
215
+ <property name =" tristate" >
216
+ <bool >false</bool >
214
217
</property >
215
218
</widget >
216
219
</item >
@@ -384,5 +387,21 @@ columns</string>
384
387
</hint >
385
388
</hints >
386
389
</connection >
390
+ <connection >
391
+ <sender >hasGeometryCol</sender >
392
+ <signal >toggled(bool)</signal >
393
+ <receiver >geomCombo</receiver >
394
+ <slot >setEnabled(bool)</slot >
395
+ <hints >
396
+ <hint type =" sourcelabel" >
397
+ <x >379</x >
398
+ <y >385</y >
399
+ </hint >
400
+ <hint type =" destinationlabel" >
401
+ <x >525</x >
402
+ <y >385</y >
403
+ </hint >
404
+ </hints >
405
+ </connection >
387
406
</connections >
388
407
</ui >
You can’t perform that action at this time.
0 commit comments