- made optional the saving of an edited object. Now the user can cancel the changes to the object.

- replaced the standard buttons in the QMessageBox's used in the app with custom ones that can have text translated
- updated the POT translation file and the MO/PO files for English and Romanian language
This commit is contained in:
Marius Stanciu
2019-04-12 22:55:20 +03:00
parent 57e8db1f9b
commit a1f7c86996
12 changed files with 6053 additions and 4740 deletions

View File

@@ -86,12 +86,14 @@ def on_language_apply_click(app, restart=False):
msgbox.setInformativeText("Are you sure do you want to change the current language to %s?" % name.capitalize())
msgbox.setWindowTitle("Apply Language ...")
msgbox.setWindowIcon(QtGui.QIcon('share/language32.png'))
msgbox.setStandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.Cancel)
msgbox.setDefaultButton(QtWidgets.QMessageBox.Yes)
bt_yes = msgbox.addButton(_('Yes'), QtWidgets.QMessageBox.YesRole)
bt_no = msgbox.addButton(_('No'), QtWidgets.QMessageBox.NoRole)
response = msgbox.exec_()
msgbox.setDefaultButton(bt_yes)
msgbox.exec_()
response = msgbox.clickedButton()
if response == QtWidgets.QMessageBox.Cancel:
if response == bt_no:
return
else:
settings = QSettings("Open Source", "FlatCAM")