Add a maximum zoom to avoid overflow embarrassments.

This commit is contained in:
David Given
2022-08-07 14:12:46 +02:00
parent e61a1ea582
commit 43ca6437ab

View File

@@ -327,6 +327,7 @@ void FluxViewerControl::OnMouseWheel(wxMouseEvent& event)
_nanosecondsPerPixel /= 1.2;
else
_nanosecondsPerPixel *= 1.2;
_nanosecondsPerPixel = std::max(30.0, _nanosecondsPerPixel);
_scrollPosition -= x * _nanosecondsPerPixel;
UpdateScale();