show warning when switching to hex view if swf is modified

This commit is contained in:
honfika@gmail.com
2016-01-04 09:46:21 +01:00
parent e333b92ffb
commit addbc66fd6
4 changed files with 18 additions and 3 deletions

View File

@@ -1040,7 +1040,12 @@ public abstract class MainFrameMenu implements MenuBuilder {
private void viewHexActionPerformed(ActionEvent evt) {
Configuration.dumpView.set(true);
mainFrame.getPanel().showView(MainPanel.VIEW_DUMP);
MainPanel mainPanel = mainFrame.getPanel();
if (mainPanel.isModified()) {
View.showMessageDialog(null, translate("message.warning.hexViewNotUpToDate"), translate("message.warning"), JOptionPane.WARNING_MESSAGE, Configuration.warningHexViewNotUpToDate);
}
mainPanel.showView(MainPanel.VIEW_DUMP);
setGroupSelection("view", "/file/view/viewHex");
setMenuChecked("/tools/timeline", false);
}