Reorder initialization and rendering to prevent color flicker

This commit is contained in:
Dan Paulat 2022-04-03 21:28:16 -05:00
parent 5a0224631d
commit dd3751313f
5 changed files with 21 additions and 5 deletions

View file

@ -274,8 +274,6 @@ void MapWidget::SelectRadarProduct(common::Level2Product product)
util::async(
[=]()
{
radarProductView->Initialize();
std::string colorTableFile =
manager::SettingsManager::palette_settings()->palette(
common::GetLevel2Palette(product));
@ -285,6 +283,8 @@ void MapWidget::SelectRadarProduct(common::Level2Product product)
common::ColorTable::Load(colorTableFile);
radarProductView->LoadColorTable(colorTable);
}
radarProductView->Initialize();
});
if (p->map_ != nullptr)