viewport.setSavedUpToDate(false);
Jalview2XML.setStateSavedUpToDate(false);
- // no hanging around needed here
+ // don't want to hang around here
Cache.setProperty("DEBUG_DELAY_SAVE", "false");
af.saveAlignment(saveProjectFile, FileFormat.Jalview);
- // this is only a two button dialog [Quit] [Cancel] so use NO_OPTION
+ Thread.sleep(1000); // give time for file to save
+
+ // this is only a two button dialog [Quit] [Cancel] so use NO_OPTION (to
+ // mean [CANCEL] -- file should already be saved so this doesn't happen and
+ // we get a QUIT response)
JvOptionPane.setMockResponse(JvOptionPane.NO_OPTION);
QResponse response = QuitHandler.getQuitResponse(true);