From 55de2c724ffb00b503cb750e435cb95020ec2f7b Mon Sep 17 00:00:00 2001 From: srcejon Date: Mon, 9 Jun 2025 20:06:58 +0100 Subject: [PATCH] Wait until connected before sending initial CZML --- plugins/feature/map/mapmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/feature/map/mapmodel.cpp b/plugins/feature/map/mapmodel.cpp index 5d56b978e..db9b54411 100644 --- a/plugins/feature/map/mapmodel.cpp +++ b/plugins/feature/map/mapmodel.cpp @@ -428,7 +428,7 @@ MapItem *ObjectMapModel::newMapItem(const QObject *sourcePipe, const QString &gr void ObjectMapModel::update3D(MapItem *item) { CesiumInterface *cesium = m_gui->cesium(); - if (cesium) + if (cesium && cesium->isConnected()) // Wait until connected, otherwise initial czml will be lost { ObjectMapItem *objectMapItem = (ObjectMapItem *)item; cesium->update(objectMapItem, isTarget(objectMapItem), isSelected3D(objectMapItem));