Skip to content
Permalink
Browse files

Merge pull request #8319 from rldhont/fix-dbmanager-sql-layer-set-uni…

…que-combo-3

[BUGFIX][DbManager] SQL Layer: fix unique combo setting in QGIS 3
  • Loading branch information
rldhont committed Oct 25, 2018
2 parents 8f4f7f1 + 2eb22d9 commit 3ff5c8299da47eb5f0c4131ba35647765f5a1ad8
Showing with 2 additions and 3 deletions.
  1. +2 −3 python/plugins/db_manager/dlg_sql_layer_window.py
@@ -177,9 +177,8 @@ def __init__(self, iface, layer, parent=None):
item.setCheckState(Qt.Checked)
else:
keyColumn = uri.keyColumn()
for item in self.uniqueModel.findItems("*", Qt.MatchWildcard):
if item.data() == keyColumn:
self.uniqueCombo.setCurrentIndex(self.uniqueModel.indexFromItem(item).row())
if self.uniqueModel.findItems(keyColumn):
self.uniqueCombo.setEditText(keyColumn)

# Finally layer name, filter and selectAtId
self.layerNameEdit.setText(layer.name())

0 comments on commit 3ff5c82

Please sign in to comment.
You can’t perform that action at this time.