- 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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user