Fix viewer load termination

Handle streamer success, failure, and cancellation as distinct terminal states so failed or cancelled loads do not finalize as successful models. Clean up partial model/UI state in the full and minimal viewer apps when a load is cancelled or fails.

Generated with the assistance of an AI coding tool.
This commit is contained in:
Dion Moult
2026-04-22 11:27:53 +10:00
parent 29f5132510
commit 4e4553201b
8 changed files with 103 additions and 4 deletions
+2
View File
@@ -60,6 +60,7 @@ private slots:
void onLoadedFromSidecar(uint32_t mid, qint64 elapsed_ms);
void onStreamedElementsReady(uint32_t mid, std::vector<ElementInfo> elements);
void onLoadedFromStream(uint32_t mid, qint64 elapsed_ms);
void onLoadCancelled(uint32_t mid);
void onLoadError(uint32_t mid, QString message);
void onAllLoadsFinished();
@@ -75,6 +76,7 @@ private:
const std::string& name,
const std::string& type);
void writeSidecarForModel(uint32_t mid);
void removeModelUi(uint32_t mid);
void applyPendingBenchmark();
QString formatElapsed(qint64 ms) const;