From 8ec719d4498043fb2525512b520a748ce114f2da Mon Sep 17 00:00:00 2001 From: tom Date: Fri, 30 Jul 2021 09:37:45 -0400 Subject: [PATCH] GP-1181 override to address bug with high resolution mouse wheel (Closes #3281, Closes #3284) --- .../graph/visualization/DefaultGraphDisplay.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java b/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java index 61c07b36d2..0d07f4211f 100644 --- a/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java +++ b/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java @@ -297,7 +297,16 @@ public class DefaultGraphDisplay implements GraphDisplay { Lens lens = Lens.builder().lensShape(Lens.Shape.RECTANGLE).magnification(3.f).build(); lens.setMagnification(2.f); LensMagnificationGraphMousePlugin magnificationPlugin = - new LensMagnificationGraphMousePlugin(1.f, 60.f, .2f); + new LensMagnificationGraphMousePlugin(1.f, 60.f, .2f) { + // Override to address a bug when using a high resolution mouse wheel. + // May be removed when jungrapht-visualization version is updated + @Override + public void mouseWheelMoved(MouseWheelEvent e) { + if (e.getWheelRotation() != 0) { + super.mouseWheelMoved(e); + } + } + }; MutableTransformer transformer = viewer.getRenderContext() .getMultiLayerTransformer()