Skip to content

Commit

Permalink
genPOI: don't ignore invalid polyline point
Browse files Browse the repository at this point in the history
There is no point in ignoring an invalid point, because without an error
message the user might wonder, why it's poyline doesn't look the way it
should.
  • Loading branch information
AstraLuma authored and MasterofJOKers committed Feb 23, 2015
1 parent 7229fcc commit 3cd2afb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions overviewer_core/aux_files/genPOI.py
Expand Up @@ -314,9 +314,7 @@ def create_marker_from_filter_result(poi, result):
if 'polyline' in result and hasattr(result['polyline'], '__iter__'):
d['polyline'] = []
for point in result['polyline']:
# This poor man's validation code almost definately needs improving.
if type(point) == dict:
d['polyline'].append(dict(x=point['x'], y=point['y'], z=point['z']))
d['polyline'].append(dict(x=point['x'], y=point['y'], z=point['z'])) # point.copy() would work, but this validates better
if isinstance(result['color'], basestring):
d['strokeColor'] = result['color']

Expand Down

0 comments on commit 3cd2afb

Please sign in to comment.