Fix image reader peak height

CURA-7429
This commit is contained in:
Nino van Hooff 2020-05-07 14:29:30 +02:00
parent 2ecd30d6a9
commit 5a3bcb6161
3 changed files with 8 additions and 4 deletions

View file

@ -155,8 +155,10 @@ class ImageReaderUI(QObject):
if len(value) > 0:
try:
self.peak_height = float(value.replace(",", "."))
if self.peak_height < 0:
self.peak_height = 2.5
except ValueError: # Can happen with incomplete numbers, such as "-".
self._width = 0
self.peak_height = 2.5 # restore default
else:
self.peak_height = 0