From 36e7f8672d725d5ee32b925433e6d6b264033ef2 Mon Sep 17 00:00:00 2001 From: Brice Dutheil Date: Wed, 27 Jul 2022 13:09:34 +0200 Subject: [PATCH] chore(flamegraph): Try consuming mouse event when button is clicked Refs: #94 --- .../bric3/fireplace/core/ui/JScrollPaneWithBackButton.java | 1 + 1 file changed, 1 insertion(+) diff --git a/fireplace-swing/src/main/java/io/github/bric3/fireplace/core/ui/JScrollPaneWithBackButton.java b/fireplace-swing/src/main/java/io/github/bric3/fireplace/core/ui/JScrollPaneWithBackButton.java index 7b41a734..72bbb34b 100644 --- a/fireplace-swing/src/main/java/io/github/bric3/fireplace/core/ui/JScrollPaneWithBackButton.java +++ b/fireplace-swing/src/main/java/io/github/bric3/fireplace/core/ui/JScrollPaneWithBackButton.java @@ -171,6 +171,7 @@ protected void processMouseEvent(MouseEvent e, JLayer lay if (id == MouseEvent.MOUSE_CLICKED) { if (buttonRect.contains(currentMousePoint)) { scrollBackToTop(layer.getView()); + e.consume(); } } else if (id == MouseEvent.MOUSE_PRESSED && viewRect.y > 0 && buttonRect.contains(currentMousePoint)) { e.consume();