X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=aca8baa099d9199478b475e02cbda36123d20e3b;hb=1140532d01b32b648e7e5b17ea717ae790625f8f;hp=00bd4f9f04863b7ac705544e96b2065ccea74353;hpb=d4eb0781b285bc64fbc9b040c9bfc1eb5f6d8267;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 00bd4f9..aca8baa 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -95,6 +95,7 @@ import jalview.api.analysis.SimilarityParamsI; import jalview.bin.Cache; import jalview.bin.Console; import jalview.bin.Jalview; +import jalview.bin.groovy.JalviewObjectI; import jalview.commands.CommandI; import jalview.commands.EditCommand; import jalview.commands.EditCommand.Action; @@ -503,7 +504,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void focusGained(FocusEvent e) { - Jalview.setCurrentAlignFrame(AlignFrame.this); + Jalview.getInstance().setCurrentAlignFrame(AlignFrame.this); } }); @@ -5841,6 +5842,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } } alignPanel.validateAnnotationDimensions(true); + // TODO this triggers relayout of annotation panel - otherwise annotation label height is different to panel height + alignPanel.fontChanged(); alignPanel.alignmentChanged(); } @@ -5963,12 +5966,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override protected void runGroovy_actionPerformed() { - Jalview.setCurrentAlignFrame(this); + Jalview.getInstance().setCurrentAlignFrame(this); groovy.console.ui.Console console = Desktop.getGroovyConsole(); if (console != null) { try { + console.setVariable(JalviewObjectI.currentAlFrameName, this); console.runScript(); } catch (Exception ex) {