From 8cdea6c63e8ae0d16a4fedf9a14371822358c4c7 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 21 Sep 2015 12:44:07 +0100 Subject: [PATCH] JAL-1152 set initial state of show alignment/sequence annotations menu --- src/jalview/appletgui/AlignFrame.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 2a2fc81..a8d73ee 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -234,8 +234,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, normSequenceLogo.setState(viewport.isNormaliseSequenceLogo()); applyToAllGroups.setState(viewport.getColourAppliesToAllGroups()); annotationPanelMenuItem.setState(viewport.isShowAnnotation()); - showAlignmentAnnotations.setState(viewport.isShowAnnotation()); - showSequenceAnnotations.setState(viewport.isShowAnnotation()); + showAlignmentAnnotations.setEnabled(annotationPanelMenuItem.getState()); + showSequenceAnnotations.setEnabled(annotationPanelMenuItem.getState()); + showAlignmentAnnotations.setState(true); + showSequenceAnnotations.setState(false); seqLimits.setState(viewport.getShowJVSuffix()); @@ -816,8 +818,11 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } else if (source == annotationPanelMenuItem) { - viewport.setShowAnnotation(annotationPanelMenuItem.getState()); - alignPanel.setAnnotationVisible(annotationPanelMenuItem.getState()); + boolean showAnnotations = annotationPanelMenuItem.getState(); + showAlignmentAnnotations.setEnabled(showAnnotations); + showSequenceAnnotations.setEnabled(showAnnotations); + viewport.setShowAnnotation(showAnnotations); + alignPanel.setAnnotationVisible(showAnnotations); } else if (source == sequenceFeatures) { -- 1.7.10.2