- fixed issue #302 where a copied object lost all the tools
This commit is contained in:
parent
90a8b44cdf
commit
7af96faef6
|
@ -5880,24 +5880,24 @@ class App(QtCore.QObject):
|
||||||
self.report_usage("on_copy_object()")
|
self.report_usage("on_copy_object()")
|
||||||
|
|
||||||
def initialize(obj_init, app):
|
def initialize(obj_init, app):
|
||||||
obj_init.solid_geometry = obj.solid_geometry
|
obj_init.solid_geometry = deepcopy(obj.solid_geometry)
|
||||||
try:
|
try:
|
||||||
obj_init.follow_geometry = obj.follow_geometry
|
obj_init.follow_geometry = deepcopy(obj.follow_geometry)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
obj_init.apertures = obj.apertures
|
obj_init.apertures = deepcopy(obj.apertures)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if obj.tools:
|
if obj.tools:
|
||||||
obj_init.tools = obj.tools
|
obj_init.tools = deepcopy(obj.tools)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug("App.on_copy_object() --> %s" % str(e))
|
log.debug("App.on_copy_object() --> %s" % str(e))
|
||||||
|
|
||||||
def initialize_excellon(obj_init, app):
|
def initialize_excellon(obj_init, app):
|
||||||
obj_init.tools = obj.tools
|
obj_init.tools = deepcopy(obj.tools)
|
||||||
|
|
||||||
# drills are offset, so they need to be deep copied
|
# drills are offset, so they need to be deep copied
|
||||||
obj_init.drills = deepcopy(obj.drills)
|
obj_init.drills = deepcopy(obj.drills)
|
||||||
|
@ -5921,29 +5921,29 @@ class App(QtCore.QObject):
|
||||||
def on_copy_object2(self, custom_name):
|
def on_copy_object2(self, custom_name):
|
||||||
|
|
||||||
def initialize_geometry(obj_init, app):
|
def initialize_geometry(obj_init, app):
|
||||||
obj_init.solid_geometry = obj.solid_geometry
|
obj_init.solid_geometry = deepcopy(obj.solid_geometry)
|
||||||
try:
|
try:
|
||||||
obj_init.follow_geometry = obj.follow_geometry
|
obj_init.follow_geometry = deepcopy(obj.follow_geometry)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
obj_init.apertures = obj.apertures
|
obj_init.apertures = deepcopy(obj.apertures)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if obj.tools:
|
if obj.tools:
|
||||||
obj_init.tools = obj.tools
|
obj_init.tools = deepcopy(obj.tools)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug("on_copy_object2() --> %s" % str(e))
|
log.debug("on_copy_object2() --> %s" % str(e))
|
||||||
|
|
||||||
def initialize_gerber(obj_init, app):
|
def initialize_gerber(obj_init, app):
|
||||||
obj_init.solid_geometry = obj.solid_geometry
|
obj_init.solid_geometry = deepcopy(obj.solid_geometry)
|
||||||
obj_init.apertures = deepcopy(obj.apertures)
|
obj_init.apertures = deepcopy(obj.apertures)
|
||||||
obj_init.aperture_macros = deepcopy(obj.aperture_macros)
|
obj_init.aperture_macros = deepcopy(obj.aperture_macros)
|
||||||
|
|
||||||
def initialize_excellon(obj_init, app):
|
def initialize_excellon(obj_init, app):
|
||||||
obj_init.tools = obj.tools
|
obj_init.tools = deepcopy(obj.tools)
|
||||||
# drills are offset, so they need to be deep copied
|
# drills are offset, so they need to be deep copied
|
||||||
obj_init.drills = deepcopy(obj.drills)
|
obj_init.drills = deepcopy(obj.drills)
|
||||||
# slots are offset, so they need to be deep copied
|
# slots are offset, so they need to be deep copied
|
||||||
|
|
|
@ -18,6 +18,7 @@ CAD program, and create G-Code for Isolation routing.
|
||||||
- fixed the TclCommand MillHoles
|
- fixed the TclCommand MillHoles
|
||||||
- changed the name of TclCommand MillHoles to MillDrills and added a new TclCommand named MillSlots
|
- changed the name of TclCommand MillHoles to MillDrills and added a new TclCommand named MillSlots
|
||||||
- modified the MillDrills and MillSlots TclCommands to accept as parameter a list of tool diameters to be milled instead of tool indexes
|
- modified the MillDrills and MillSlots TclCommands to accept as parameter a list of tool diameters to be milled instead of tool indexes
|
||||||
|
- fixed issue #302 where a copied object lost all the tools
|
||||||
|
|
||||||
10.09.2019
|
10.09.2019
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue