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
@@ -68,6 +68,7 @@ signals:
void meshReady(MeshChunk chunk);
void instanceReady(InstanceChunk chunk);
void finished();
void cancelled();
void errorOccurred(const QString& message);
private:
@@ -77,6 +78,7 @@ private:
std::unique_ptr<QThread> worker_thread_;
std::atomic<bool> running_{false};
std::atomic<bool> cancel_requested_{false};
std::atomic<bool> succeeded_{false};
std::atomic<int> progress_{0};
std::mutex elements_mutex_;