JAL-2163 set title for the alignframe from restored view state
[jalview.git] / src / jalview / gui / Jalview2XML.java
index 9861697..0f15505 100644 (file)
@@ -635,9 +635,15 @@ public class Jalview2XML
       JarOutputStream jout = new JarOutputStream(fos);
       List<AlignFrame> frames = new ArrayList<AlignFrame>();
 
+      // resolve splitframes
+      if (af.getViewport().getCodingComplement() != null)
       {
+        frames = ((SplitFrame) af.getSplitViewContainer()).getAlignFrames();
       }
+      else
+      {
         frames.add(af);
+      }
       saveAllFrames(frames, jout);
       try
       {
@@ -4533,7 +4539,7 @@ public class Jalview2XML
       }
     }
     af.setMenusFromViewport(af.viewport);
-
+    af.setTitle(view.getTitle());
     // TODO: we don't need to do this if the viewport is aready visible.
     /*
      * Add the AlignFrame to the desktop (it may be 'gathered' later), unless it