Don't refresh text events until application is initialized (before signals are connected)

This commit is contained in:
Dan Paulat 2022-11-16 00:12:03 -06:00
parent dabcf1114e
commit e0dceda2d2
5 changed files with 81 additions and 3 deletions

View file

@ -1,4 +1,5 @@
#include <scwx/qt/manager/text_event_manager.hpp>
#include <scwx/qt/main/application.hpp>
#include <scwx/awips/text_product_file.hpp>
#include <scwx/provider/warnings_provider.hpp>
#include <scwx/util/logger.hpp>
@ -33,7 +34,13 @@ public:
textEventMutex_ {},
warningsProvider_ {kDefaultWarningsProviderUrl}
{
util::async([=]() { Refresh(); });
util::async(
[=]()
{
main::Application::WaitForInitialization();
logger_->debug("Start Refresh");
Refresh();
});
}
~Impl()