- fulfilled request: When saving a CNC file, if the file name is changed in the OS window, the new name does appear in the “Selected” (in name) and “Project” tabs (in cnc_job)

This commit is contained in:
Marius Stanciu 2019-08-03 03:48:20 +03:00
parent c6d917dec4
commit cd803266a6
2 changed files with 8 additions and 2 deletions

View File

@ -188,7 +188,7 @@ class FlatCAMObj(QtCore.QObject):
self.muted_ui = False
def on_name_activate(self):
def on_name_activate(self, silent=None):
old_name = copy(self.options["name"])
new_name = self.ui.name_entry.get_value()
@ -205,7 +205,8 @@ class FlatCAMObj(QtCore.QObject):
self.options["name"] = self.ui.name_entry.get_value()
self.default_data["name"] = self.ui.name_entry.get_value()
self.app.collection.update_view()
self.app.inform.emit(_("[success] Name changed from {old} to {new}").format(old=old_name, new=new_name))
if silent:
self.app.inform.emit(_("[success] Name changed from {old} to {new}").format(old=old_name, new=new_name))
def on_offset_button_click(self):
self.app.report_usage("obj_on_offset_button")
@ -5638,6 +5639,10 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
"[WARNING_NOTCL] Export Machine Code cancelled ..."))
return
new_name = os.path.split(str(filename))[1].rpartition('.')[0]
self.ui.name_entry.set_value(new_name)
self.on_name_activate(silent=True)
preamble = str(self.ui.prepend_text.get_value())
postamble = str(self.ui.append_text.get_value())

View File

@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
3.08.2019
- added project name to the window title
- fulfilled request: When saving a CNC file, if the file name is changed in the OS window, the new name does appear in the “Selected” (in name) and “Project” tabs (in cnc_job)
31.07.2019