This repository was archived by the owner on Sep 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 37
37
#include " RemediationRoleSaver.h"
38
38
39
39
#include < QFileDialog>
40
+ #include < QPushButton>
40
41
#include < QAbstractEventDispatcher>
41
42
#include < QCloseEvent>
42
43
#include < QFileSystemWatcher>
@@ -1558,11 +1559,21 @@ void MainWindow::fileChanged(const QString& path)
1558
1559
return ;
1559
1560
mFSLastSeen = path;
1560
1561
1561
- QMessageBox::information (
1562
- this , QObject::tr (" SCAP Workbench" ),
1563
- QObject::tr (" Opened file was modified after opening: %1\n\n "
1564
- " To reload, click File -> Reload Opened Content" ).arg (path)
1565
- );
1562
+ QMessageBox question;
1563
+ question.setText (QObject::tr (" The following file was modified after opening: %1" ).arg (path));
1564
+ question.setInformativeText (QObject::tr (" Do you wish to reload it, losing any unsaved tailoring changes?" ));
1565
+
1566
+ QPushButton *reload = question.addButton (QObject::tr (" Reload" ), QMessageBox::AcceptRole);
1567
+ QPushButton *ignore = question.addButton (QObject::tr (" Ignore" ), QMessageBox::RejectRole);
1568
+ question.setDefaultButton (ignore);
1569
+ question.setIcon (QMessageBox::Question);
1570
+
1571
+ question.exec ();
1572
+
1573
+ if (question.clickedButton () == reload)
1574
+ {
1575
+ reloadContent ();
1576
+ }
1566
1577
}
1567
1578
1568
1579
QString MainWindow::getDefaultSaveDirectory ()
You can’t perform that action at this time.
0 commit comments