summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2017-07-11 19:37:10 +0000
committerfrosch <frosch@openttd.org>2017-07-11 19:37:10 +0000
commita68296271916b48674b0a7cf13c7c63078cf4c73 (patch)
tree23774c0ec972186a90913c9ef00742dab92b0314 /src
parent64c5f00429da45e9aafbffd001379012543504c5 (diff)
downloadopenttd-a68296271916b48674b0a7cf13c7c63078cf4c73.tar.xz
(svn r27889) -Change: Do not cancel headquarter construction and engine-preview-query when shift-clicking (adf88)
Diffstat (limited to 'src')
-rw-r--r--src/company_gui.cpp2
-rw-r--r--src/engine_gui.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index 0be667958..4d394203d 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -2381,7 +2381,7 @@ struct CompanyWindow : Window
virtual void OnPlaceObject(Point pt, TileIndex tile)
{
- if (DoCommandP(tile, OBJECT_HQ, 0, CMD_BUILD_OBJECT | CMD_MSG(STR_ERROR_CAN_T_BUILD_COMPANY_HEADQUARTERS))) {
+ if (DoCommandP(tile, OBJECT_HQ, 0, CMD_BUILD_OBJECT | CMD_MSG(STR_ERROR_CAN_T_BUILD_COMPANY_HEADQUARTERS)) && !_shift_pressed) {
ResetObjectToPlace();
this->RaiseButtons();
}
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp
index 070ad6727..d1ccd3bf4 100644
--- a/src/engine_gui.cpp
+++ b/src/engine_gui.cpp
@@ -128,7 +128,7 @@ struct EnginePreviewWindow : Window {
DoCommandP(0, this->window_number, 0, CMD_WANT_ENGINE_PREVIEW);
/* FALL THROUGH */
case WID_EP_NO:
- delete this;
+ if (!_shift_pressed) delete this;
break;
}
}