diff --git a/CHANGELOG.md b/CHANGELOG.md index 520c4f4a..7aecc318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta - fixed Extract Plugin not extracting soldermask for aperture macros - fixed INFO in Gerber Object UI to show correctly the type of geometric element in Follow geometry +- in INFO functionality for Gerber Object made the difference if the Follow geometry is not a Point or a LineString 18.09.2021 diff --git a/appObjects/FlatCAMObj.py b/appObjects/FlatCAMObj.py index 50c6bd39..f05e32bc 100644 --- a/appObjects/FlatCAMObj.py +++ b/appObjects/FlatCAMObj.py @@ -660,6 +660,7 @@ class FlatCAMObj(QtCore.QObject): solid_nr = 0 follow_nr_points = 0 follow_nr_lines = 0 + follow_nr = 0 clear_nr = 0 if 'geometry' in obj.tools[ap]: @@ -671,8 +672,10 @@ class FlatCAMObj(QtCore.QObject): if 'follow' in el: if isinstance(el['follow'], Point): follow_nr_points += 1 - else: + elif isinstance(el['follow'], LineString): follow_nr_lines += 1 + else: + follow_nr += 1 if 'clear' in el: clear_nr += 1 else: @@ -684,7 +687,8 @@ class FlatCAMObj(QtCore.QObject): elif follow_nr_lines == 0 and follow_nr_points > 0: temp_ap['Follow_Geo'] = '%s %s' % (str(follow_nr_points), _("Points")) else: - temp_ap['Follow_Geo'] = '%s %s' % (str(follow_nr_lines + follow_nr_points), _("Elements")) + temp_ap['Follow_Geo'] = '%s %s' % \ + (str(follow_nr_lines + follow_nr_points + follow_nr), _("Elements")) temp_ap['Clear_Geo'] = '%s %s' % (str(clear_nr), _("Polygons")) apid = self.treeWidget.addParent(