etiennesky/profiletool — pull request #1 by wonder-sk (2014-02-14 11:48:44+00:00)
Title: Fix Python error when the profile is outside of layer bounds

Currently if the selectd profile is completely out of bounds, the following error will pop up (because profile[nr]["z] is full of None values):

Traceback (most recent call last):
File "/home/martin/.qgis2/python/plugins/profiletool/profileplugin.py", line 201, in doubleClicked
self.doprofile.calculateProfil(self.pointstoDraw,self.mdl, self.plotlibrary)
File "/home/martin/.qgis2/python/plugins/profiletool/tools/doprofile.py", line 80, in calculateProfil
PlottingTool().reScalePlot(self.dockwidget.scaleSlider.value(), self.dockwidget, self.profiles, library)
File "/home/martin/.qgis2/python/plugins/profiletool/tools/plottingtool.py", line 199, in reScalePlot
if self.findMin(profiles, i,scale) File "/home/martin/.qgis2/python/plugins/profiletool/tools/plottingtool.py", line 176, in findMin
minVal = min( z for z in profiles[nr]["z"] if z is not None )
ValueError: min() arg is an empty sequence