From 61aa0f698c7494efa3e6408ce54fac4e8400053c Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 4 May 2018 13:11:48 +0100 Subject: [PATCH] JAL-2960 raise the structure view after adding structures to it --- src/jalview/api/structures/JalviewStructureDisplayI.java | 5 +++++ src/jalview/gui/StructureViewer.java | 1 + src/jalview/gui/StructureViewerBase.java | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/src/jalview/api/structures/JalviewStructureDisplayI.java b/src/jalview/api/structures/JalviewStructureDisplayI.java index 2cd9348..abb23f8 100644 --- a/src/jalview/api/structures/JalviewStructureDisplayI.java +++ b/src/jalview/api/structures/JalviewStructureDisplayI.java @@ -120,4 +120,9 @@ public interface JalviewStructureDisplayI */ void setAlignAddedStructures(boolean alignAdded); + /** + * Raise the panel to the top of the stack... + */ + void toFront(); + } diff --git a/src/jalview/gui/StructureViewer.java b/src/jalview/gui/StructureViewer.java index 35a4bc6..0158055 100644 --- a/src/jalview/gui/StructureViewer.java +++ b/src/jalview/gui/StructureViewer.java @@ -293,6 +293,7 @@ public class StructureViewer sview.addToExistingViewer(pdb, seqsForPdb, null, ap, pdbId); } sview.updateTitleAndMenus(); + sview.toFront(); return sview; } ViewerType viewerType = getViewerType(); diff --git a/src/jalview/gui/StructureViewerBase.java b/src/jalview/gui/StructureViewerBase.java index 840dbae..e9c1051 100644 --- a/src/jalview/gui/StructureViewerBase.java +++ b/src/jalview/gui/StructureViewerBase.java @@ -1034,4 +1034,10 @@ public abstract class StructureViewerBase extends GStructureViewer return seqColoursApplied; } + @Override + public void toFront() + { + toFront(); + } + } -- 1.7.10.2