Skip to content

Commit

Permalink
db-manager: Update input layer and table names
Browse files Browse the repository at this point in the history
when selecting an external file

Fixes #22033 - wrong shapefile import
  • Loading branch information
elpaso committed May 23, 2019
1 parent d16e693 commit 3df7f89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/plugins/db_manager/dlg_import_vector.py
Expand Up @@ -74,6 +74,7 @@ def __init__(self, inLayer, outDb, outUri, parent=None):
self.cboSchema.currentIndexChanged.connect(self.populateTables)
self.widgetSourceSrid.setCrs(QgsProject.instance().crs())
self.widgetTargetSrid.setCrs(QgsProject.instance().crs())
self.updateInputLayer()

def setupWorkingMode(self, mode):
""" hide the widget to select a layer/file if the input layer is already set """
Expand Down Expand Up @@ -160,6 +161,7 @@ def chooseInputFile(self):
settings.setValue("/db_manager/lastUsedDir", QFileInfo(filename).filePath())
settings.setValue("/UI/lastVectorFileFilter", lastVectorFormat)

self.cboInputLayer.setCurrentIndex(-1)
self.cboInputLayer.setEditText(filename)

def reloadInputLayer(self):
Expand Down

0 comments on commit 3df7f89

Please sign in to comment.