Change: improve when to stops following vehicle (#12808)
- Changing zoom no longer stops following vehicle - Key scrolling while following a vehicle stops following - Autoscrolling while following a vehicle stops following - Main viewport can begin following a vehicle at any zoom
This commit is contained in:
+2
-2
@@ -3234,7 +3234,7 @@ public:
|
||||
ShowExtraViewportWindow(TileVirtXY(v->x_pos, v->y_pos));
|
||||
} else {
|
||||
const Window *mainwindow = GetMainWindow();
|
||||
if (click_count > 1 && mainwindow->viewport->zoom <= ZOOM_LVL_NORMAL) {
|
||||
if (click_count > 1) {
|
||||
/* main window 'follows' vehicle */
|
||||
mainwindow->viewport->follow_vehicle = v->index;
|
||||
} else {
|
||||
@@ -3320,7 +3320,7 @@ public:
|
||||
void OnMouseWheel(int wheel) override
|
||||
{
|
||||
if (_settings_client.gui.scrollwheel_scrolling != SWS_OFF) {
|
||||
DoZoomInOutWindow(wheel < 0 ? ZOOM_IN : ZOOM_OUT, this, false);
|
||||
DoZoomInOutWindow(wheel < 0 ? ZOOM_IN : ZOOM_OUT, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user