Skip to content
Permalink
Browse files

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

…que-combo

[BUGFIX][DbManager] SQL Layer: fix unique combo setting
  • Loading branch information
rldhont committed Sep 27, 2018
2 parents 9809c7b + 3183b30 commit be9c11381e3f8dd3a3cd44408f331e77b9cd62e0
Showing with 2 additions and 3 deletions.
  1. +2 −3 python/plugins/db_manager/dlg_sql_layer_window.py
@@ -161,9 +161,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 be9c113

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