Skip to content

Commit

Permalink
Merge pull request #303 from Samweli/fix_enumtype
Browse files Browse the repository at this point in the history
Fix error when snapping layers
  • Loading branch information
Samweli authored Dec 1, 2023
2 parents 264f600 + f6f8e85 commit 2ef525c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cplus_plugin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,10 @@ def align_rasters(

resample_method_value = QgsAlignRaster.ResampleAlg.RA_NearestNeighbour

for method in QgsAlignRaster.ResampleAlg:
if method.value == int(resample_method):
resample_method_value = method
try:
resample_method_value = QgsAlignRaster.ResampleAlg(int(resample_method))
except Exception as e:
log(f"Problem creating a resample value when snapping, {e}")

if rescale_values:
lst[0].rescaleValues = rescale_values
Expand Down

0 comments on commit 2ef525c

Please sign in to comment.