- when applying a new language if there are any changes in the current project, the app will offer to save the project before the reboot
This commit is contained in:
@@ -159,6 +159,23 @@ def restart_program(app):
|
|||||||
Note: this function does not return. Any cleanup action (like
|
Note: this function does not return. Any cleanup action (like
|
||||||
saving data) must be done before calling this function.
|
saving data) must be done before calling this function.
|
||||||
"""
|
"""
|
||||||
|
if app.should_we_save and app.collection.get_list():
|
||||||
|
msgbox = QtWidgets.QMessageBox()
|
||||||
|
msgbox.setText(_("There are files/objects modified in FlatCAM. "
|
||||||
|
"\n"
|
||||||
|
"Do you want to Save the project?"))
|
||||||
|
msgbox.setWindowTitle(_("Save changes"))
|
||||||
|
msgbox.setWindowIcon(QtGui.QIcon('share/save_as.png'))
|
||||||
|
bt_yes = msgbox.addButton(_('Yes'), QtWidgets.QMessageBox.YesRole)
|
||||||
|
bt_no = msgbox.addButton(_('No'), QtWidgets.QMessageBox.NoRole)
|
||||||
|
|
||||||
|
msgbox.setDefaultButton(bt_yes)
|
||||||
|
msgbox.exec_()
|
||||||
|
response = msgbox.clickedButton()
|
||||||
|
|
||||||
|
if response == bt_yes:
|
||||||
|
app.on_file_saveprojectas(thread=True, quit=True)
|
||||||
|
|
||||||
app.save_defaults()
|
app.save_defaults()
|
||||||
python = sys.executable
|
python = sys.executable
|
||||||
os.execl(python, python, *sys.argv)
|
os.execl(python, python, *sys.argv)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
- made sure that if using an negative Gerber isolation diameter, the resulting Geometry object will use a tool with positive diameter
|
- made sure that if using an negative Gerber isolation diameter, the resulting Geometry object will use a tool with positive diameter
|
||||||
- fixed bug that when isolating a Gerber file made out of a single polygon, an Recurrsion Exception was issued together with inability to create tbe isolation
|
- fixed bug that when isolating a Gerber file made out of a single polygon, an Recurrsion Exception was issued together with inability to create tbe isolation
|
||||||
|
- when applying a new language if there are any changes in the current project, the app will offer to save the project before the reboot
|
||||||
|
|
||||||
3.08.2019
|
3.08.2019
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user