From 550949340ef5ccd5757dd50b11b9613d61571046 Mon Sep 17 00:00:00 2001 From: kiramt Date: Wed, 22 Mar 2017 14:12:50 +0000 Subject: [PATCH] JAL-2388 Reinstated original overview checks for annotation display --- src/jalview/appletgui/OverviewPanel.java | 7 +++++-- src/jalview/gui/OverviewPanel.java | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) 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++) -- 1.7.10.2