summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-02-20 18:32:42 +0000
committerterkhen <terkhen@openttd.org>2011-02-20 18:32:42 +0000
commitdcd158b03efae9e514820f8c4682b8b69ce39db6 (patch)
tree212b646f6ca7d6deab0a946ab23fc1b844c9a6e4
parentbd9610ec3c973f5fba8037d4b0e877ccb0f0a38d (diff)
downloadopenttd-dcd158b03efae9e514820f8c4682b8b69ce39db6.tar.xz
(svn r22118) -Fix [FS#4525]: The refit window was not correctly updated after selecting with Ctrl+Click (Regiovogel).
-rw-r--r--src/vehicle_gui.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 048af0e4c..96580dac9 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -795,7 +795,12 @@ struct RefitWindow : public Window {
this->click_x = GetClickPosition(pt.x - nwi->pos_x);
this->SetSelectedVehicles(pt.x - nwi->pos_x);
this->SetWidgetDirty(VRW_VEHICLE_PANEL_DISPLAY);
- if (!_ctrl_pressed) SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
+ if (!_ctrl_pressed) {
+ SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
+ } else {
+ /* The vehicle selection has changed. */
+ this->InvalidateData(2);
+ }
break;
}