+ rework message box in revert command

This commit is contained in:
wmayer 2016-05-20 13:02:28 +02:00
parent 2e79aefc2f
commit 9cb37116a7

View File

@ -537,11 +537,13 @@ StdCmdRevert::StdCmdRevert()
void StdCmdRevert::activated(int iMsg)
{
QMessageBox msgBox;
QMessageBox msgBox(Gui::getMainWindow());
msgBox.setIcon(QMessageBox::Question);
msgBox.setWindowTitle(qApp->translate("Std_Revert","Revert document"));
msgBox.setText(qApp->translate("Std_Revert","This will discard all the changes since last file save."));
msgBox.setInformativeText(qApp->translate("Std_Revert","Are you sure?"));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Cancel);
msgBox.setInformativeText(qApp->translate("Std_Revert","Do you want to continue?"));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
int ret = msgBox.exec();
if (ret == QMessageBox::Yes)
doCommand(Command::App,"App.ActiveDocument.restore()");