summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-03-13 21:33:57 +0000
committerfrosch <frosch@openttd.org>2011-03-13 21:33:57 +0000
commit5689b3dbda6b3e4adee2c20e32d06a9e5a158c07 (patch)
treee0c452f1425e66657cb164a4c2eadc5ac7fd1765
parentdd208232770650342d681f50e801b1f2de03aa61 (diff)
downloadopenttd-5689b3dbda6b3e4adee2c20e32d06a9e5a158c07.tar.xz
(svn r22246) -Fix: Process order window invalidations for specific orders in command-scope.
-rw-r--r--src/order_gui.cpp3
-rw-r--r--src/timetable_gui.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index d23648383..b1889a511 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -835,8 +835,9 @@ public:
break;
default:
- if (!gui_scope) break;
if (data < 0) break;
+
+ if (gui_scope) break; // only do this once; from command scope
from = GB(data, 0, 8);
to = GB(data, 8, 8);
/* Moving an order. If one of these is INVALID_VEH_ORDER_ID, then
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp
index 791e3312e..7abe4f4f0 100644
--- a/src/timetable_gui.cpp
+++ b/src/timetable_gui.cpp
@@ -271,7 +271,8 @@ struct TimetableWindow : Window {
break;
default: {
- if (!gui_scope) break;
+ if (gui_scope) break; // only do this once; from command scope
+
/* Moving an order. If one of these is INVALID_VEH_ORDER_ID, then
* the order is being created / removed */
if (this->sel_index == -1) break;