Allow scrolling when selecting destination station or building single-tile objects

This commit is contained in:
pelya
2014-11-16 03:38:40 +02:00
parent 9875c97661
commit 8f7e444f4f
8 changed files with 18 additions and 9 deletions

View File

@@ -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;