mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -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;
|
_nanosecondsPerPixel /= 1.2;
|
||||||
else
|
else
|
||||||
_nanosecondsPerPixel *= 1.2;
|
_nanosecondsPerPixel *= 1.2;
|
||||||
|
_nanosecondsPerPixel = std::max(30.0, _nanosecondsPerPixel);
|
||||||
_scrollPosition -= x * _nanosecondsPerPixel;
|
_scrollPosition -= x * _nanosecondsPerPixel;
|
||||||
|
|
||||||
UpdateScale();
|
UpdateScale();
|
||||||
|
|||||||
Reference in New Issue
Block a user