JAL-1367 clear the current representative sequence
[jalview.git] / src / jalview / gui / AlignFrame.java
index 77c3b6a..05799a8 100755 (executable)
@@ -4603,7 +4603,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     } catch (Exception ex)
     {
       al = null;
-      jalview.bin.Cache.log.debug("Exception during translation.", ex);
+      jalview.bin.Cache.log.error("Exception during translation. Please report this !", ex);
+      JOptionPane
+      .showMessageDialog(
+              Desktop.desktop,
+              "Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace.",
+              "Implementation error: Translation Failed", JOptionPane.ERROR_MESSAGE);
+      return;
     }
     if (al == null)
     {
@@ -5494,7 +5500,15 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       alignPanel.paintAlignment(true);
     }
   }
-
+  public void clearAlignmentSeqRep()
+  {
+    if (viewport.getAlignment().hasSeqrep()) {
+      viewport.getAlignment().setSeqrep(null);
+      PaintRefresher.Refresh(this, viewport.getSequenceSetId());
+      alignPanel.updateAnnotation();
+      alignPanel.paintAlignment(true);
+    }
+  }
   /**
    * make the given alignmentPanel the currently selected tab
    *