mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 08:10:05 +00:00
Enable/disable auto update of radar data based on timeline selection
This commit is contained in:
parent
80f04be510
commit
4963add9cc
8 changed files with 129 additions and 39 deletions
|
|
@ -62,6 +62,7 @@ public:
|
|||
overlayLayer_ {nullptr},
|
||||
colorTableLayer_ {nullptr},
|
||||
autoRefreshEnabled_ {true},
|
||||
autoUpdateEnabled_ {true},
|
||||
selectedLevel2Product_ {common::Level2Product::Unknown},
|
||||
lastPos_(),
|
||||
currentStyleIndex_ {0},
|
||||
|
|
@ -146,6 +147,7 @@ public:
|
|||
std::shared_ptr<ColorTableLayer> colorTableLayer_;
|
||||
|
||||
bool autoRefreshEnabled_;
|
||||
bool autoUpdateEnabled_;
|
||||
|
||||
common::Level2Product selectedLevel2Product_;
|
||||
|
||||
|
|
@ -520,6 +522,11 @@ void MapWidget::SetAutoRefresh(bool enabled)
|
|||
}
|
||||
}
|
||||
|
||||
void MapWidget::SetAutoUpdate(bool enabled)
|
||||
{
|
||||
p->autoUpdateEnabled_ = enabled;
|
||||
}
|
||||
|
||||
void MapWidget::SetMapLocation(double latitude,
|
||||
double longitude,
|
||||
bool updateRadarSite)
|
||||
|
|
@ -869,7 +876,7 @@ void MapWidgetImpl::RadarProductManagerConnect()
|
|||
const std::string& product,
|
||||
std::chrono::system_clock::time_point latestTime)
|
||||
{
|
||||
if (autoRefreshEnabled_ &&
|
||||
if (autoUpdateEnabled_ &&
|
||||
context_->radar_product_group() == group &&
|
||||
(group == common::RadarProductGroup::Level2 ||
|
||||
context_->radar_product() == product))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue