summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-02-05 21:07:25 +0000
committerfrosch <frosch@openttd.org>2011-02-05 21:07:25 +0000
commitd82475cf889f6eff52490ef8d612f08574e856db (patch)
tree2922bcf1cbb9f4ad461dfbc7112c82b6714ac6c5
parentef3ec0f8c83567f0fce799270ea2e43ab7bb8cb0 (diff)
downloadopenttd-d82475cf889f6eff52490ef8d612f08574e856db.tar.xz
(svn r21988) -Change: Disable smooth scrolling for GHK_CENTER_ZOOM when zooming is also involved.
-rw-r--r--src/main_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index ee135f686..f7e19c9de 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -314,8 +314,9 @@ struct MainWindow : Window
case GHK_CENTER_ZOOM: {
Point pt = GetTileBelowCursor();
if (pt.x != -1) {
+ bool instant = (num == GHK_CENTER_ZOOM && this->viewport->zoom != ZOOM_LVL_MIN);
if (num == GHK_CENTER_ZOOM) MaxZoomInOut(ZOOM_IN, this);
- ScrollMainWindowTo(pt.x, pt.y);
+ ScrollMainWindowTo(pt.x, pt.y, -1, instant);
}
break;
}