File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class gz::sim::GuiRunner::Implementation
74
74
public: std::thread updateThread;
75
75
76
76
// / \brief True if the initial state has been received and processed.
77
- public: bool receivedInitialState{false };
77
+ public: std::atomic< bool > receivedInitialState{false };
78
78
79
79
// / \brief Name of WorldControl service
80
80
public: std::string controlService;
@@ -264,7 +264,6 @@ void GuiRunner::OnStateAsyncService(const msgs::SerializedStepMap &_res)
264
264
// variables.
265
265
QMetaObject::invokeMethod (this , " OnStateQt" , Qt::QueuedConnection,
266
266
Q_ARG (msgs::SerializedStepMap, _res));
267
- this ->dataPtr ->receivedInitialState = true ;
268
267
269
268
// todo(anyone) store reqSrv string in a member variable and use it here
270
269
// and in RequestState()
@@ -302,6 +301,8 @@ void GuiRunner::OnStateQt(const msgs::SerializedStepMap &_msg)
302
301
// Update all plugins
303
302
this ->dataPtr ->updateInfo = convert<UpdateInfo>(_msg.stats ());
304
303
this ->UpdatePlugins ();
304
+
305
+ this ->dataPtr ->receivedInitialState = true ;
305
306
}
306
307
307
308
// ///////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments