Merge branch 'bug/JAL-1988_JAL-3772_improved_quit_handling' into merge/JAL-1988_JAL...
authorBen Soares <b.soares@dundee.ac.uk>
Wed, 9 Nov 2022 15:30:29 +0000 (15:30 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Wed, 9 Nov 2022 15:30:29 +0000 (15:30 +0000)
1  2 
src/jalview/gui/Desktop.java

@@@ -191,14 -191,6 +191,14 @@@ public class Desktop extends jalview.jb
  
    public static HashMap<String, FileWriter> savingFiles = new HashMap<String, FileWriter>();
  
 +  private static int DRAG_MODE = JDesktopPane.OUTLINE_DRAG_MODE;
 +
 +  public static void setLiveDragMode(boolean b)
 +  {
 +    DRAG_MODE = b ? JDesktopPane.LIVE_DRAG_MODE
 +            : JDesktopPane.OUTLINE_DRAG_MODE;
 +  }
 +
    private JalviewChangeSupport changeSupport = new JalviewChangeSupport();
  
    public static boolean nosplash = false;
      }
  
      getContentPane().add(desktop, BorderLayout.CENTER);
 -    desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
 +    desktop.setDragMode(DRAG_MODE);
  
      // This line prevents Windows Look&Feel resizing all new windows to maximum
      // if previous window was maximised
      saveState_actionPerformed(true);
    }
  
-   private void setProjectFile(File choice)
+   protected void setProjectFile(File choice)
    {
      this.projectFile = choice;
    }