JAL-4124 need to repaint alignFrames imported from project after resolving references...
authorJames Procter <j.procter@dundee.ac.uk>
Fri, 1 Sep 2023 15:22:30 +0000 (16:22 +0100)
committerJames Procter <j.procter@dundee.ac.uk>
Fri, 1 Sep 2023 15:22:30 +0000 (16:22 +0100)
src/jalview/project/Jalview2XML.java

index 627aba3..d1e836e 100644 (file)
@@ -3137,6 +3137,7 @@ public class Jalview2XML
       initSeqRefs();
     }
     AlignFrame af = null, _af = null;
+    List<AlignFrame> toRepaint=new ArrayList<AlignFrame>();
     IdentityHashMap<AlignmentI, AlignmentI> importedDatasets = new IdentityHashMap<>();
     Map<String, AlignFrame> gatherToThisFrame = new HashMap<>();
     final String file = jprovider.getFilename();
@@ -3171,6 +3172,7 @@ public class Jalview2XML
             if (_af != null && object.getViewport().size() > 0)
             // getJalviewModelSequence().getViewportCount() > 0)
             {
+              toRepaint.add(_af);
               if (af == null)
               {
                 // store a reference to the first view
@@ -3200,6 +3202,10 @@ public class Jalview2XML
       } while (jarentry != null);
       jin.close();
       resolveFrefedSequences();
+      for (AlignFrame alignFrame:toRepaint)
+      {
+        alignFrame.repaint();
+      }
     } catch (IOException ex)
     {
       ex.printStackTrace();