From 8eff02a5d3267f992a4f1d61387d31e1a73a01eb Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sat, 5 Mar 2022 05:37:57 -0800 Subject: [PATCH] fix engine sniffer repaint (#3981) --- .../main/java/com/rusefi/ui/engine/EngineSnifferPanel.java | 6 ++---- .../ui/src/main/java/com/rusefi/ui/engine/UpDownImage.java | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/java_console/ui/src/main/java/com/rusefi/ui/engine/EngineSnifferPanel.java b/java_console/ui/src/main/java/com/rusefi/ui/engine/EngineSnifferPanel.java index bee11af310..45ee265f9a 100644 --- a/java_console/ui/src/main/java/com/rusefi/ui/engine/EngineSnifferPanel.java +++ b/java_console/ui/src/main/java/com/rusefi/ui/engine/EngineSnifferPanel.java @@ -221,10 +221,8 @@ public class EngineSnifferPanel { image.setWaveReport(wr, revolutions); } - /** - * this is to fix the UI glitch when images tab shows a tiny square - */ - UiUtils.trueLayout(chartPanel.getParent()); + // Repaint now that we've updated state + SwingUtilities.invokeLater(() -> UiUtils.trueRepaint(imagePanel)); } public JPanel getPanel() { diff --git a/java_console/ui/src/main/java/com/rusefi/ui/engine/UpDownImage.java b/java_console/ui/src/main/java/com/rusefi/ui/engine/UpDownImage.java index 9e333e6a0d..ff75862cff 100644 --- a/java_console/ui/src/main/java/com/rusefi/ui/engine/UpDownImage.java +++ b/java_console/ui/src/main/java/com/rusefi/ui/engine/UpDownImage.java @@ -129,7 +129,6 @@ public class UpDownImage extends JPanel { this.engineReport = wr; propagateDwellIntoSensor(wr); this.revolutions = revolutions; - UiUtils.trueRepaint(this); } private void propagateDwellIntoSensor(EngineReport wr) {