From: Ben Soares Date: Wed, 11 Sep 2024 15:23:43 +0000 (+0100) Subject: JAL-4460 Update currentFileFormat /after/ new format selection X-Git-Tag: Release_2_11_4_0~9^2~1^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4dd649b088b13205d9eff79b494158d67c63dc16;p=jalview.git JAL-4460 Update currentFileFormat /after/ new format selection --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 797e7ec..c225afe 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -1032,8 +1032,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, return progressBar == null ? false : progressBar.operationInProgress(); } - - /** * Sets the text of the status bar. Note that setting a null or empty value * will cause the status bar to be hidden, with possibly undesirable flicker @@ -1211,12 +1209,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, .getString("label.select_file_format_before_saving"), MessageManager.getString("label.file_format_not_specified"), JvOptionPane.WARNING_MESSAGE); - currentFileFormat = chooser.getSelectedFormat(); value = chooser.showSaveDialog(this); if (value != JalviewFileChooser.APPROVE_OPTION) { return; } + currentFileFormat = chooser.getSelectedFormat(); } fileName = chooser.getSelectedFile().getPath(); @@ -3962,30 +3960,35 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } tp = new TreePanel(alignPanel, type, modelName, options); - - frameTitle = formCalculationTitle(tp.getPanelTitle(),onSelection,this.title); - + + frameTitle = formCalculationTitle(tp.getPanelTitle(), onSelection, + this.title); + Desktop.addInternalFrame(tp, frameTitle, 600, 500); } /** * - * @param panelTitle - calculation name - * @param onSelection - true if a selection was analysed - * @param viewName - null or current view name - * @param title - alignment frame title - * @return (?on region) from (?viewName of) alignment name + * @param panelTitle + * - calculation name + * @param onSelection + * - true if a selection was analysed + * @param viewName + * - null or current view name + * @param title + * - alignment frame title + * @return (?on region) from (?viewName of) alignment name */ - public String formCalculationTitle(String panelTitle, - boolean onSelection, String title) + public String formCalculationTitle(String panelTitle, boolean onSelection, + String title) { String frameTitle = panelTitle; - + frameTitle += (onSelection ? " on region" : ""); frameTitle += " from "; - if (viewport.getViewName()!=null) + if (viewport.getViewName() != null) { frameTitle += viewport.getViewName() + " of "; }