From 4dd649b088b13205d9eff79b494158d67c63dc16 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 11 Sep 2024 16:23:43 +0100 Subject: [PATCH] JAL-4460 Update currentFileFormat /after/ new format selection --- src/jalview/gui/AlignFrame.java | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) 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 "; } -- 1.7.10.2