summaryrefslogtreecommitdiff
path: root/src/cheat_gui.cpp
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-10-15 17:32:31 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-10-15 17:32:31 +0000
commit5ab204c8a170e692835e126daa00987c5f0217b6 (patch)
treecbbdbd9b6e60f264650e2745da17278ae173eedd /src/cheat_gui.cpp
parenta6fe1f2f63c51379dfae0cf947bc9e1adc7800a8 (diff)
downloadopenttd-5ab204c8a170e692835e126daa00987c5f0217b6.tar.xz
(svn r25867) -Fix [FS#5764]: Shift dates on link graphs when using scenario editor date tool.
Diffstat (limited to 'src/cheat_gui.cpp')
-rw-r--r--src/cheat_gui.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp
index 87288279e..9eb405d2a 100644
--- a/src/cheat_gui.cpp
+++ b/src/cheat_gui.cpp
@@ -24,8 +24,7 @@
#include "rail_gui.h"
#include "settings_gui.h"
#include "company_gui.h"
-#include "linkgraph/linkgraph.h"
-#include "linkgraph/linkgraphjob.h"
+#include "linkgraph/linkgraphschedule.h"
#include "widgets/cheat_widget.h"
@@ -103,10 +102,7 @@ static int32 ClickChangeDateCheat(int32 p1, int32 p2)
if (p1 == _cur_year) return _cur_year;
Date new_date = ConvertYMDToDate(p1, ymd.month, ymd.day);
- LinkGraph *lg;
- FOR_ALL_LINK_GRAPHS(lg) lg->ShiftDates(new_date - _date);
- LinkGraphJob *lgj;
- FOR_ALL_LINK_GRAPH_JOBS(lgj) lgj->ShiftJoinDate(new_date - _date);
+ LinkGraphSchedule::Instance()->ShiftDates(new_date - _date);
SetDate(new_date, _date_fract);
EnginesMonthlyLoop();
SetWindowDirty(WC_STATUS_BAR, 0);