- more update s on project save choice

This commit is contained in:
Marius Stanciu 2019-02-16 00:40:51 +02:00 committed by Marius S
parent 367d6f3155
commit 33b722aa1a
2 changed files with 15 additions and 0 deletions

View File

@ -2403,6 +2403,7 @@ class App(QtCore.QObject):
log.debug("Object changed, updating the bounding box data on self.options")
# delete the old selection shape
self.delete_selection_shape()
self.should_we_save = True
def on_object_plotted(self, obj):
self.on_zoom_fit(None)
@ -2730,6 +2731,8 @@ class App(QtCore.QObject):
v['data']['name'] = obj_name_single
self.new_object("geometry", obj_name_single, initialize)
self.should_we_save = True
def on_edit_join_exc(self):
"""
Callback for Edit->Join Excellon. Joins the selected excellon objects into
@ -2750,6 +2753,7 @@ class App(QtCore.QObject):
FlatCAMExcellon.merge(objs, obj)
self.new_object("excellon", 'Combo_Excellon', initialize)
self.should_we_save = True
def on_edit_join_grb(self):
"""
@ -2771,6 +2775,7 @@ class App(QtCore.QObject):
FlatCAMGerber.merge(objs, obj)
self.new_object("gerber", 'Combo_Gerber', initialize)
self.should_we_save = True
def on_convert_singlegeo_to_multigeo(self):
self.report_usage("on_convert_singlegeo_to_multigeo()")
@ -2793,6 +2798,8 @@ class App(QtCore.QObject):
obj.solid_geometry[:] = []
obj.plot()
self.should_we_save = True
self.inform.emit("[success] A Geometry object was converted to MultiGeo type.")
def on_convert_multigeo_to_singlegeo(self):
@ -2817,6 +2824,8 @@ class App(QtCore.QObject):
obj.solid_geometry = deepcopy(total_solid_geometry)
obj.plot()
self.should_we_save = True
self.inform.emit("[success] A Geometry object was converted to SingleGeo type.")
def on_options_dict_change(self, field):
@ -2900,6 +2909,8 @@ class App(QtCore.QObject):
scale_options(factor)
self.options_write_form()
self.should_we_save = True
# change this only if the workspace is active
if self.defaults['global_workspace'] is True:
self.plotcanvas.draw_workspace()
@ -3856,6 +3867,7 @@ class App(QtCore.QObject):
self.plot_all(zoom=False)
self.inform.emit('[success] Origin set ...')
self.plotcanvas.vis_disconnect('mouse_press', self.on_set_zero_click)
self.should_we_save = True
def on_selectall(self):
self.report_usage("on_selectall()")
@ -3916,6 +3928,7 @@ class App(QtCore.QObject):
obj.mirror('X', [px, py])
obj.plot()
self.object_changed.emit(obj)
except Exception as e:
self.inform.emit("[ERROR_NOTCL] Due of %s, Flip action was not executed." % str(e))
return
@ -3955,6 +3968,7 @@ class App(QtCore.QObject):
obj.mirror('Y', [px, py])
obj.plot()
self.object_changed.emit(obj)
except Exception as e:
self.inform.emit("[ERROR_NOTCL] Due of %s, Flip action was not executed." % str(e))
return

View File

@ -359,6 +359,7 @@ class ToolCutOut(FlatCAMTool):
cutout_obj.plot()
self.app.inform.emit("[success] Any form CutOut operation finished.")
self.app.ui.notebook.setCurrentWidget(self.app.ui.project_tab)
self.should_we_save = True
def on_rectangular_cutout(self):
name = self.obj_combo.currentText()