Inform user about visual alignment, not dataset updates
authoramwaterhouse <Andrew Waterhouse>
Tue, 1 Nov 2005 17:09:15 +0000 (17:09 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 1 Nov 2005 17:09:15 +0000 (17:09 +0000)
src/jalview/io/SequenceFeatureFetcher.java

index f3f144c..44ce60b 100755 (executable)
@@ -236,14 +236,6 @@ public class SequenceFeatureFetcher implements Runnable
       sequence.setStart(absStart);\r
       sequence.setEnd(absEnd);\r
 \r
-      if ( (absStart != sequence.getStart()) || (absEnd != sequence.getEnd()))\r
-      {\r
-        sbuffer.append("Updated: " + sequence.getName() + " " +\r
-                       sequence.getStart() + "/" + sequence.getEnd() +\r
-                       "  to  " + absStart + "/" + absEnd + "\n");\r
-      }\r
-\r
-\r
 \r
       int n = 0;\r
       SequenceI seq2;\r
@@ -260,15 +252,19 @@ public class SequenceFeatureFetcher implements Runnable
           absStart = sequence.getSequence().indexOf(nonGapped);\r
           absEnd = absStart + nonGapped.toString().length() - 1;\r
 \r
-          sbuffer.append("Updated: VISUAL " + seq2.getName() + " " +\r
-                         seq2.getStart() + "/" + seq2.getEnd() +\r
-                         "  to  " + (absStart + sequence.getStart()) + "/" +\r
-\r
-                         (absEnd + sequence.getStart()) + "\n");\r
-\r
-          seq2.setStart(absStart + sequence.getStart());\r
-          seq2.setEnd(absEnd + sequence.getStart());\r
+          // This is the Viewd alignment sequences\r
+          // No need to tell the user of the dataset updates\r
+          if ( (seq2.getStart() != absStart+sequence.getStart())\r
+             || (seq2.getEnd() != absEnd+sequence.getStart()))\r
+          {\r
+            sbuffer.append("Updated: " + seq2.getName() + " " +\r
+                           seq2.getStart() + "/" + seq2.getEnd() +\r
+                           "  to  " + (absStart + sequence.getStart()) + "/" +\r
+                           (absEnd + sequence.getStart()) + "\n");\r
 \r
+            seq2.setStart(absStart + sequence.getStart());\r
+            seq2.setEnd(absEnd + sequence.getStart());\r
+          }\r
         }\r
 \r
         n++;\r