Prompt before leaving draft

This commit is contained in:
drdev
2014-01-08 02:06:17 +00:00
parent 1c6ccbb20a
commit cb055269d3

View File

@@ -279,6 +279,12 @@ public class CEditorDraftingProcess extends ACEditorBase<PaperCard, DeckGroup> {
*/
@Override
public boolean canSwitchAway(boolean isClosing) {
if (isClosing) {
String userPrompt =
"This will end the current draft and you will not be able to resume.\n\n" +
"Leave anyway?";
return FOptionPane.showConfirmDialog(userPrompt, "Leave Draft?", "Leave", "Cancel", false);
}
return true;
}