mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-24 11:11:02 -07:00
Add a maximum zoom to avoid overflow embarrassments.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user