Skip to content
Permalink
Browse files

[BUGFIX][DbManager] SQL Layer: fix unique combo setting in QGIS 3

When opening Update SQL layer, the unique combobox is not well set specifically with oracle.

It's a forward porting of #7872

Funded by Ifremer
  • Loading branch information
rldhont committed Oct 25, 2018
1 parent 0bd1b7a commit 2eb22d93ff0cd5c7c046fba1631c4061c387b3a7
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 2eb22d9

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