From: gmungoc Date: Mon, 21 Sep 2015 11:44:07 +0000 (+0100) Subject: JAL-1152 set initial state of show alignment/sequence annotations menu X-Git-Tag: Release_2_10_0~394^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8cdea6c63e8ae0d16a4fedf9a14371822358c4c7;p=jalview.git JAL-1152 set initial state of show alignment/sequence annotations menu --- 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) {