summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-12-24 14:48:38 +0000
committeralberth <alberth@openttd.org>2010-12-24 14:48:38 +0000
commitcdae336febf896c7c8f00dc0098bfaf5fe7a217f (patch)
tree714e650a0cabe382cc41a92d21c5cdd4b8e3549a
parentc5ce84267ac9c03a7c3828caf83ee930c27c5c56 (diff)
downloadopenttd-cdae336febf896c7c8f00dc0098bfaf5fe7a217f.tar.xz
(svn r21619) -Fix [FS#4327]: Don't copy direction bits when restarting a rail selection.
-rw-r--r--src/viewport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 8b08feb3f..34709cd71 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2176,7 +2176,7 @@ void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, ViewportDrag
_thd.selstart.y += TILE_SIZE / 2;
}
- HighLightStyle others = _thd.place_mode & ~HT_DRAG_MASK;
+ HighLightStyle others = _thd.place_mode & ~(HT_DRAG_MASK | HT_DIR_MASK);
if ((_thd.place_mode & HT_DRAG_MASK) == HT_RECT) {
_thd.place_mode = HT_SPECIAL | others;
_thd.next_drawstyle = HT_RECT | others;
@@ -2813,7 +2813,7 @@ EventState VpHandlePlaceSizingDrag()
/* mouse button released..
* keep the selected tool, but reset it to the original mode. */
_special_mouse_mode = WSM_NONE;
- HighLightStyle others = _thd.next_drawstyle & ~HT_DRAG_MASK;
+ HighLightStyle others = _thd.place_mode & ~(HT_DRAG_MASK | HT_DIR_MASK);
if ((_thd.next_drawstyle & HT_DRAG_MASK) == HT_RECT) {
_thd.place_mode = HT_RECT | others;
} else if (_thd.select_method & VPM_SIGNALDIRS) {