diff options
Diffstat (limited to 'src/planner-range.cpp')
-rw-r--r-- | src/planner-range.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/planner-range.cpp b/src/planner-range.cpp index 41b0f56..c223665 100644 --- a/src/planner-range.cpp +++ b/src/planner-range.cpp @@ -28,7 +28,7 @@ namespace datetime { ***/ SimpleRangePlanner::SimpleRangePlanner(const std::shared_ptr<Engine>& engine, - const std::shared_ptr<Timezone>& timezone): + const std::shared_ptr<Timezone>& timezone): m_engine(engine), m_timezone(timezone), m_range(std::pair<DateTime,DateTime>(DateTime::NowLocal(), DateTime::NowLocal())) @@ -38,6 +38,11 @@ SimpleRangePlanner::SimpleRangePlanner(const std::shared_ptr<Engine>& engine, rebuild_soon(); }); + m_timezone->timezone.changed().connect([this](const std::string& s){ + g_debug("RangePlanner %p rebuilding soon because the timezone changed to '%s'", this, s.c_str()); + rebuild_soon(); + }); + range().changed().connect([this](const std::pair<DateTime,DateTime>&){ g_debug("rebuilding because the date range changed"); rebuild_soon(); |