Skip to content

Commit

Permalink
More QgsMapLayer python fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 26, 2019
1 parent ac651ee commit ef8d893
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/plugin.py
Expand Up @@ -278,7 +278,7 @@ def uniqueIdFunction(self):
return "row_number() over ()"

def toSqlLayer(self, sql, geomCol, uniqueCol, layerName="QueryLayer", layerType=None, avoidSelectById=False, filter=""):
from qgis.core import QgsMapLayer, QgsVectorLayer, QgsRasterLayer
from qgis.core import QgsVectorLayer, QgsRasterLayer

if uniqueCol is None:
if hasattr(self, 'uniqueIdFunction'):
Expand Down
2 changes: 0 additions & 2 deletions python/plugins/db_manager/dlg_sql_layer_window.py
Expand Up @@ -306,8 +306,6 @@ def _getSqlLayer(self, _filter):
if query.strip().endswith(';'):
query = query.strip()[:-1]

from qgis.core import QgsMapLayer

layerType = QgsMapLayerType.VectorLayer if self.vectorRadio.isChecked() else QgsMapLayerType.RasterLayer

# get a new layer name
Expand Down
2 changes: 0 additions & 2 deletions python/plugins/db_manager/dlg_sql_window.py
Expand Up @@ -407,8 +407,6 @@ def _getSqlLayer(self, _filter):
if query.strip().endswith(';'):
query = query.strip()[:-1]

from qgis.core import QgsMapLayer

layerType = QgsMapLayerType.VectorLayer if self.vectorRadio.isChecked() else QgsMapLayerType.RasterLayer

# get a new layer name
Expand Down
1 change: 1 addition & 0 deletions python/plugins/processing/gui/wrappers.py
Expand Up @@ -44,6 +44,7 @@
QgsWkbTypes,
QgsSettings,
QgsProject,
QgsMapLayer,
QgsMapLayerType,
QgsVectorLayer,
QgsProcessing,
Expand Down

0 comments on commit ef8d893

Please sign in to comment.