X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileLoader.java;fp=src%2Fjalview%2Fio%2FFileLoader.java;h=b16c37f83ce16b5e3088d9443e3a865d3d133947;hb=5784154b972346e9a3718654d7f875da49b3c167;hp=dc7adac39496cd8dd761cb367e564019c6840bec;hpb=ca160187a050f6d4e50158cd5b51f75c83a7179e;p=jalview.git diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index dc7adac..b16c37f 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -361,8 +361,9 @@ public class FileLoader implements Runnable // We read the data anyway - it might make sense. } // BH 2018 switch to File object here instead of filename - alignFrame = new Jalview2XML(raiseGUI && !Jalview.isBatchMode()).loadJalviewAlign( - selectedFile == null ? file : selectedFile); + alignFrame = new Jalview2XML(raiseGUI && !Jalview.isBatchMode()) + .loadJalviewAlign( + selectedFile == null ? file : selectedFile); } else { @@ -563,7 +564,8 @@ public class FileLoader implements Runnable } catch (Exception er) { - jalview.bin.Console.errPrintln("Exception whilst opening file '" + file); + jalview.bin.Console + .errPrintln("Exception whilst opening file '" + file); er.printStackTrace(); if (raiseGUI && !Jalview.isBatchMode()) { @@ -603,7 +605,8 @@ public class FileLoader implements Runnable } }); } - jalview.bin.Console.errPrintln("Out of memory loading file " + file + "!!"); + jalview.bin.Console + .errPrintln("Out of memory loading file " + file + "!!"); } loadtime += System.currentTimeMillis(); @@ -684,10 +687,18 @@ public class FileLoader implements Runnable AlignViewport avp = af.getViewport(); if (avp == null) return; - avp.setSavedUpToDate(!protocol.isDynamic(), - QuitHandler.Message.UNSAVED_ALIGNMENTS); + boolean upToDate = !protocol.isDynamic(); + if (protocol.isUrl() && !Cache + .getDefault(PROMPT_SAVE_UNCHANGED_URL_ALIGNMENTS, true)) + { + upToDate = true; + } + avp.setSavedUpToDate(upToDate, + upToDate ? null : QuitHandler.Message.UNSAVED_ALIGNMENTS); } + public static final String PROMPT_SAVE_UNCHANGED_URL_ALIGNMENTS = "PROMPT_SAVE_UNCHANGED_URL_ALIGNMENTS"; + public static boolean getUseDefaultFileFormat() { return useDefaultFileFormat;