Koch plugin: Ignore empty selection in boundsChanged

This commit is contained in:
David Vierra 2017-07-03 13:45:55 -10:00
parent 288afd77c1
commit 91645f1674

View File

@ -152,6 +152,9 @@ class KochSnowflakePlugin(LSystemPlugin):
return symbol
def boundsChanged(self, bounds):
if bounds is None:
return # no selection
size = (bounds.width + bounds.length) / 2
maxiter = math.log(size, 4) + 2
self.iterationsSlider.setMaximum(maxiter)