From 4ec172090b6db4dda4433e9faf3f658058b994e4 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sat, 29 Oct 2022 15:11:58 +0100 Subject: [PATCH] =?utf8?q?JAL-4094=20shift+click=20drag=20up/down=20to=20res?= =?utf8?q?ize=20all=20annotation=20rows=20with=20matching=20calcId=20and=20l?= =?utf8?q?abel.=E2=80=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/gui/AnnotationPanel.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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); } -- 1.7.10.2