From 17d1ef868ab765a2f27a0159a9c3c30ba2290b56 Mon Sep 17 00:00:00 2001 From: jfree Date: Tue, 15 Mar 2022 16:48:23 +0100 Subject: [PATCH] fix: correctly dims frames adjacent to selected frame. See #28. --- .../github/bric3/fireplace/flamegraph/FlameGraphPainter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fireplace-swing/src/main/java/com/github/bric3/fireplace/flamegraph/FlameGraphPainter.java b/fireplace-swing/src/main/java/com/github/bric3/fireplace/flamegraph/FlameGraphPainter.java index dc6fede1..a88af81d 100644 --- a/fireplace-swing/src/main/java/com/github/bric3/fireplace/flamegraph/FlameGraphPainter.java +++ b/fireplace-swing/src/main/java/com/github/bric3/fireplace/flamegraph/FlameGraphPainter.java @@ -206,8 +206,8 @@ private void paint(Graphics2D g2, Rectangle visibleRect, boolean minimapMode) { false, selectedFrame != null && ( frame.stackDepth < selectedFrame.stackDepth - || frame.endX < selectedFrame.startX - || frame.startX > selectedFrame.endX), + || frame.endX <= selectedFrame.startX + || frame.startX >= selectedFrame.endX), minimapMode), frameBorderColor, minimapMode);