Fixed bug preventing from saving G-Code.
This commit is contained in:
@@ -858,7 +858,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
filename = QtGui.QFileDialog.getSaveFileName(caption="Export G-Code ...",
|
filename = QtGui.QFileDialog.getSaveFileName(caption="Export G-Code ...",
|
||||||
directory=self.app.last_folder)
|
directory=self.app.defaults["last_folder"])
|
||||||
except TypeError:
|
except TypeError:
|
||||||
filename = QtGui.QFileDialog.getSaveFileName(caption="Export G-Code ...")
|
filename = QtGui.QFileDialog.getSaveFileName(caption="Export G-Code ...")
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ import inspect # TODO: Remove
|
|||||||
import FlatCAMApp
|
import FlatCAMApp
|
||||||
from PyQt4 import Qt, QtGui, QtCore
|
from PyQt4 import Qt, QtGui, QtCore
|
||||||
|
|
||||||
|
|
||||||
class ObjectCollection(QtCore.QAbstractListModel):
|
class ObjectCollection(QtCore.QAbstractListModel):
|
||||||
|
"""
|
||||||
|
Object storage and management.
|
||||||
|
"""
|
||||||
|
|
||||||
classdict = {
|
classdict = {
|
||||||
"gerber": FlatCAMGerber,
|
"gerber": FlatCAMGerber,
|
||||||
@@ -39,9 +41,13 @@ class ObjectCollection(QtCore.QAbstractListModel):
|
|||||||
|
|
||||||
self.click_modifier = None
|
self.click_modifier = None
|
||||||
|
|
||||||
|
## GUI Events
|
||||||
self.view.selectionModel().selectionChanged.connect(self.on_list_selection_change)
|
self.view.selectionModel().selectionChanged.connect(self.on_list_selection_change)
|
||||||
self.view.activated.connect(self.on_item_activated)
|
self.view.activated.connect(self.on_item_activated)
|
||||||
|
|
||||||
|
def on_key(self, event):
|
||||||
|
print event
|
||||||
|
|
||||||
def on_mouse_down(self, event):
|
def on_mouse_down(self, event):
|
||||||
print "Mouse button pressed on list"
|
print "Mouse button pressed on list"
|
||||||
|
|
||||||
|
|||||||
@@ -1470,13 +1470,6 @@ class Gerber (Geometry):
|
|||||||
# Example: %LPD*% or %LPC*%
|
# Example: %LPD*% or %LPC*%
|
||||||
# If polarity changes, creates geometry from current
|
# If polarity changes, creates geometry from current
|
||||||
# buffer, then adds or subtracts accordingly.
|
# buffer, then adds or subtracts accordingly.
|
||||||
|
|
||||||
## DEBUG
|
|
||||||
if line_num == 11:
|
|
||||||
print "LINE:", gline
|
|
||||||
print "RE:", self.lpol_re.pattern
|
|
||||||
print "MATCH:", self.lpol_re.search(gline)
|
|
||||||
|
|
||||||
match = self.lpol_re.search(gline)
|
match = self.lpol_re.search(gline)
|
||||||
if match:
|
if match:
|
||||||
if len(path) > 1 and current_polarity != match.group(1):
|
if len(path) > 1 and current_polarity != match.group(1):
|
||||||
@@ -1489,12 +1482,10 @@ class Gerber (Geometry):
|
|||||||
path = [path[-1]]
|
path = [path[-1]]
|
||||||
|
|
||||||
# --- Apply buffer ---
|
# --- Apply buffer ---
|
||||||
print "current_polarity:", current_polarity
|
|
||||||
# If added for testing of bug #83
|
# If added for testing of bug #83
|
||||||
# TODO: Remove when bug fixed
|
# TODO: Remove when bug fixed
|
||||||
if len(poly_buffer) > 0:
|
if len(poly_buffer) > 0:
|
||||||
if current_polarity == 'D':
|
if current_polarity == 'D':
|
||||||
print "Union with Cascaded Union of:", poly_buffer
|
|
||||||
self.solid_geometry = self.solid_geometry.union(cascaded_union(poly_buffer))
|
self.solid_geometry = self.solid_geometry.union(cascaded_union(poly_buffer))
|
||||||
else:
|
else:
|
||||||
self.solid_geometry = self.solid_geometry.difference(cascaded_union(poly_buffer))
|
self.solid_geometry = self.solid_geometry.difference(cascaded_union(poly_buffer))
|
||||||
|
|||||||
Reference in New Issue
Block a user