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);