Allow scrolling when selecting destination station or building single-tile objects
This commit is contained in:
@@ -1955,7 +1955,9 @@ bool HandleViewportClicked(const ViewPort *vp, int x, int y)
|
||||
{
|
||||
if (_move_pressed) return false;
|
||||
|
||||
if ((_thd.place_mode & HT_DRAG_MASK) != HT_NONE) {
|
||||
// Allow scrolling viewport with mouse even in selection mode,
|
||||
// unless we select line or area, or perform drag&drop
|
||||
if ((_thd.place_mode & HT_DRAG_MASK) != HT_NONE && !(_thd.place_mode & HT_SCROLL_VIEWPORT)) {
|
||||
PlaceObject();
|
||||
return true;
|
||||
}
|
||||
@@ -1973,6 +1975,11 @@ bool HandleViewportMouseUp(const ViewPort *vp, int x, int y)
|
||||
if (v != NULL && VehicleClicked(v)) return true;
|
||||
}
|
||||
|
||||
if ((_thd.place_mode & HT_DRAG_MASK) != HT_NONE) {
|
||||
PlaceObject();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (CheckClickOnTown(vp, x, y)) return true;
|
||||
if (CheckClickOnStation(vp, x, y)) return true;
|
||||
if (CheckClickOnSign(vp, x, y)) return true;
|
||||
|
||||
Reference in New Issue
Block a user