mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:30:06 +00:00
Load correct level 2 product if one was previously selected
This commit is contained in:
parent
0be0e420d1
commit
5a0224631d
1 changed files with 12 additions and 1 deletions
|
|
@ -61,6 +61,7 @@ public:
|
||||||
radarProductLayer_ {nullptr},
|
radarProductLayer_ {nullptr},
|
||||||
overlayLayer_ {nullptr},
|
overlayLayer_ {nullptr},
|
||||||
colorTableLayer_ {nullptr},
|
colorTableLayer_ {nullptr},
|
||||||
|
selectedLevel2Product_ {common::Level2Product::Unknown},
|
||||||
selectedTime_ {},
|
selectedTime_ {},
|
||||||
lastPos_(),
|
lastPos_(),
|
||||||
currentStyleIndex_ {0},
|
currentStyleIndex_ {0},
|
||||||
|
|
@ -97,6 +98,7 @@ public:
|
||||||
std::shared_ptr<OverlayLayer> overlayLayer_;
|
std::shared_ptr<OverlayLayer> overlayLayer_;
|
||||||
std::shared_ptr<ColorTableLayer> colorTableLayer_;
|
std::shared_ptr<ColorTableLayer> colorTableLayer_;
|
||||||
|
|
||||||
|
common::Level2Product selectedLevel2Product_;
|
||||||
std::chrono::system_clock::time_point selectedTime_;
|
std::chrono::system_clock::time_point selectedTime_;
|
||||||
|
|
||||||
QPointF lastPos_;
|
QPointF lastPos_;
|
||||||
|
|
@ -167,7 +169,14 @@ MapWidgetImpl::GetLevel2ProductOrDefault(const std::string& productName) const
|
||||||
|
|
||||||
if (level2Product == common::Level2Product::Unknown)
|
if (level2Product == common::Level2Product::Unknown)
|
||||||
{
|
{
|
||||||
level2Product = common::Level2Product::Reflectivity;
|
if (selectedLevel2Product_ != common::Level2Product::Unknown)
|
||||||
|
{
|
||||||
|
level2Product = selectedLevel2Product_;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
level2Product = common::Level2Product::Reflectivity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return level2Product;
|
return level2Product;
|
||||||
|
|
@ -236,6 +245,8 @@ void MapWidget::SelectRadarProduct(common::Level2Product product)
|
||||||
product, currentElevation, p->radarProductManager_);
|
product, currentElevation, p->radarProductManager_);
|
||||||
radarProductView->SelectTime(p->selectedTime_);
|
radarProductView->SelectTime(p->selectedTime_);
|
||||||
|
|
||||||
|
p->selectedLevel2Product_ = product;
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
radarProductView.get(),
|
radarProductView.get(),
|
||||||
&view::RadarProductView::ColorTableUpdated,
|
&view::RadarProductView::ColorTableUpdated,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue