diff options
author | Stefan Knorr (astron) <heinzlesspam@gmail.com> | 2012-02-21 19:02:01 +0100 |
---|---|---|
committer | Stefan Knorr (astron) <heinzlesspam@gmail.com> | 2012-03-10 22:00:55 +0100 |
commit | f7226666d48f6019f0244b0ac572d29e9aaffc93 (patch) | |
tree | 36a61d035ffd4a8e34dbe6c2b6500fd4bfa71d49 /basegfx | |
parent | c289ee218fb39813298c540c715378a762f66692 (diff) |
Add more values that zoom shouldn't skip
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/tools/zoomtools.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/basegfx/source/tools/zoomtools.cxx b/basegfx/source/tools/zoomtools.cxx index 89ea0ccf07ab..d4b274ce0b01 100644 --- a/basegfx/source/tools/zoomtools.cxx +++ b/basegfx/source/tools/zoomtools.cxx @@ -104,8 +104,11 @@ static long enforceStep(long nCurrent, long nPrevious, int nStep) long zoomIn(long nCurrent) { long nNew = roundZoom( nCurrent * ZOOM_FACTOR ); - // make sure 100% isn't skipped + // make sure some values are not skipped + nNew = enforceStep(nNew, nCurrent, 200); nNew = enforceStep(nNew, nCurrent, 100); + nNew = enforceStep(nNew, nCurrent, 75); + nNew = enforceStep(nNew, nCurrent, 50); nNew = enforceStep(nNew, nCurrent, 25); return nNew; } @@ -118,8 +121,11 @@ long zoomIn(long nCurrent) long zoomOut(long nCurrent) { long nNew = roundZoom( nCurrent / ZOOM_FACTOR ); - // make sure 100% isn't skipped + // make sure some values are not skipped + nNew = enforceStep(nNew, nCurrent, 200); nNew = enforceStep(nNew, nCurrent, 100); + nNew = enforceStep(nNew, nCurrent, 75); + nNew = enforceStep(nNew, nCurrent, 50); nNew = enforceStep(nNew, nCurrent, 25); return nNew; } |