From: Jim Procter Date: Sat, 29 Oct 2022 14:11:58 +0000 (+0100) Subject: JAL-4094 shift+click drag up/down to resize all annotation rows with matching calcId... X-Git-Tag: Release_2_11_4_0~516 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4ec172090b6db4dda4433e9faf3f658058b994e4;p=jalview.git JAL-4094 shift+click drag up/down to resize all annotation rows with matching calcId and label.
 --- diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index d31e52d..c3b44ce 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -150,6 +150,8 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, private MouseWheelListener[] _mwl; + private boolean notJustOne; + /** * Creates a new AnnotationPanel object. * @@ -776,6 +778,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, * mostly vertical drag */ dragMode = DragMode.Resize; + notJustOne = evt.isShiftDown(); /* * but could also be a matrix drag @@ -816,7 +819,20 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, AlignmentAnnotation graphAnnotation = av.getAlignment() .getAlignmentAnnotation()[graphStretch]; int newHeight = Math.max(0, graphAnnotation.graphHeight + deltaY); - graphAnnotation.graphHeight = newHeight; + if (notJustOne) + { + for (AlignmentAnnotation similar : av.getAlignment() + .findAnnotations(null, graphAnnotation.getCalcId(), + graphAnnotation.label)) + { + similar.graphHeight = newHeight; + } + + } + else + { + graphAnnotation.graphHeight = newHeight; + } adjustPanelHeight(); ap.paintAlignment(false, false); }