- fixed bug in Gerber parser that allowed loading as Gerber of a file that is not a Gerber
- fixed a bug in extension detection for Gerber files that allowed in the filtered list files that extension *.gb* - added a processEvents method in the Gerber parser parse_lines() method
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from camlib import Geometry, arc, arc_angle, ApertureMacro
|
||||
import FlatCAMApp
|
||||
|
||||
@@ -1416,6 +1416,8 @@ class Gerber(Geometry):
|
||||
# ######### Line did not match any pattern. Warn user. ##########
|
||||
# ################################################################
|
||||
log.warning("Line ignored (%d): %s" % (line_num, gline))
|
||||
# provide the app with a way to process the GUI events when in a blocking loop
|
||||
QtWidgets.QApplication.processEvents()
|
||||
|
||||
try:
|
||||
path_length = len(path)
|
||||
@@ -1475,7 +1477,7 @@ class Gerber(Geometry):
|
||||
sol_geo_length = 1
|
||||
|
||||
try:
|
||||
if buff_length == 0 and sol_geo_length == 0:
|
||||
if buff_length == 0 and sol_geo_length in [0, 1]:
|
||||
log.error("Object is not Gerber file or empty. Aborting Object creation.")
|
||||
return 'fail'
|
||||
except TypeError as e:
|
||||
|
||||
Reference in New Issue
Block a user