Skip to content

Commit

Permalink
db manager: fix setting of contrast enhancement for spatialite rasters (
Browse files Browse the repository at this point in the history
fixes #12497)
  • Loading branch information
jef-n committed Apr 4, 2015
1 parent ffa2ead commit be12c19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/db_manager/db_plugins/spatialite/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ def mimeUri(self):
return uri

def toMapLayer(self):
from qgis.core import QgsRasterLayer
from qgis.core import QgsRasterLayer, QgsContrastEnhancement

rl = QgsRasterLayer(self.gdalUri(), self.name)
if rl.isValid():
rl.setContrastEnhancementAlgorithm("StretchToMinimumMaximum")
rl.setContrastEnhancement(QgsContrastEnhancement.StretchToMinimumMaximum)
return rl


Expand Down

0 comments on commit be12c19

Please sign in to comment.