From: kiramt Date: Wed, 22 Mar 2017 14:12:50 +0000 (+0000) Subject: JAL-2388 Reinstated original overview checks for annotation display X-Git-Tag: Release_2_10_2~3^2~148 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=550949340ef5ccd5757dd50b11b9613d61571046;p=jalview.git JAL-2388 Reinstated original overview checks for annotation display --- diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index 2fc5716..3ef2936 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -77,7 +77,8 @@ public class OverviewPanel extends Panel implements Runnable, sr.forOverview = true; fr = new FeatureRenderer(av); - od = new OverviewDimensions(av.getRanges(), av.isShowAnnotation()); + od = new OverviewDimensions(av.getRanges(), + (av.isShowAnnotation() && av.getSequenceConsensusHash() != null)); setSize(new Dimension(od.getWidth(), od.getHeight())); addComponentListener(new ComponentAdapter() @@ -209,7 +210,9 @@ public class OverviewPanel extends Panel implements Runnable, buildImage(sampleRow, sampleCol, mg); - if (av.isShowAnnotation()) + // check for conservation annotation to make sure overview works for DNA too + if (av.isShowAnnotation() + && (av.getAlignmentConservationAnnotation() != null)) { for (int col = 0; col < od.getWidth() && !resizeAgain; col++) { diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index ac2138f..c530fdc 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -90,7 +90,9 @@ public class OverviewPanel extends JPanel implements Runnable sr.forOverview = true; fr = new FeatureRenderer(ap); - od = new OverviewDimensions(av.getRanges(), av.isShowAnnotation()); + od = new OverviewDimensions(av.getRanges(), + (av.isShowAnnotation() && av + .getAlignmentConservationAnnotation() != null)); addComponentListener(new ComponentAdapter() { @@ -201,7 +203,9 @@ public class OverviewPanel extends JPanel implements Runnable buildImage(sampleRow, sampleCol); - if (av.isShowAnnotation()) + // check for conservation annotation to make sure overview works for DNA too + if (av.isShowAnnotation() + && (av.getAlignmentConservationAnnotation() != null)) { renderer.updateFromAlignViewport(av); for (int col = 0; col < od.getWidth() && !resizeAgain; col++)