From 1a86104b19c3a046c2443c26f0c00e26336b775d Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 19 Mar 2023 17:09:13 +0100 Subject: [PATCH] fixes alignment issue in waveform canvas --- .../scviewer/database/ui/swt/internal/WaveformCanvas.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java index ec07c38..66ef070 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java @@ -363,6 +363,9 @@ public class WaveformCanvas extends Canvas implements IWaveformZoom{ } else { /* image is less higher than client area */ vertical.setMaximum(clientHeight); vertical.setEnabled(false); + if ( -origin.y > vertical.getMaximum() - height) { + origin.y = -vertical.getMaximum() + height; + } } vertical.setThumb(clientHeight); vertical.setSelection(-origin.y);