PDB residue numberings transfered and alignment view refreshed to update featureRenderer.
[jalview.git] / src / MCview / PDBChain.java
index 6f1b31a..76a0cde 100755 (executable)
@@ -104,13 +104,13 @@ public class PDBChain
   public SequenceFeature[] transferRESNUMFeatures(SequenceI seq, String status)
   {
     SequenceI sq = seq;
-    while (sq != null)
+    while (sq!=null && sq.getDatasetSequence()!=null)
     {
+      sq = sq.getDatasetSequence();
       if (sq == sequence)
       {
         return null;
       }
-      sq = sq.getDatasetSequence();
     }
     /**
      * Remove any existing features for this chain if they exist ?
@@ -138,7 +138,8 @@ public class PDBChain
         tx.setStatus(status +
                      ( (tx.getStatus() == null || tx.getStatus().length() == 0) ?
                       "" : ":" + tx.getStatus()));
-        seq.addSequenceFeature(tx);
+        if (tx.begin!=0 && tx.end!=0)
+          sq.addSequenceFeature(tx);
       }
     }
     return features;