DynamicGravitySystems / DGP

Dynamic Gravity Processor
http://dgp.readthedocs.io/en/develop/
Apache License 2.0
7 stars 4 forks source link

BUG: Error on line rectangle drag if no label set. #46

Closed bradyzp closed 6 years ago

bradyzp commented 6 years ago

Encountered error on current Develop branch with new line label code - if a Flight Line rectangle is placed and subsequently clicked or dragged, without first setting a label - an AttributeError is raised.

Cause: line 404-405: dgp/lib/plotter.py:

label = attrs['label']
label.set_animated(True)  # Raises AttributeError: 'NoneType' object has no attribute 'set_animated'

Resolution: Should be a simple case of checking that label is not None.

cbertinato commented 6 years ago

Fixed in PR #47