ifcviewer: key sidecar on path stem, drop staleness check

Previously readSidecar/writeSidecar were keyed on (path, file_size) with
staleness rejected at read time.  Switch to pure path-stem keying: foo.ifc
and foo.ifcdb/ both resolve to foo.ifcview, so the same cache serves either
source format.  Staleness is user-managed (delete the sidecar to force a
rebuild), which also lets sidecars be copied or moved independently of the
source.

v8 header drops the source_file_size field.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-04-22 11:58:04 +10:00
parent f898089b27
commit 4f929e90a7
6 changed files with 36 additions and 40 deletions
+1 -1
View File
@@ -295,7 +295,7 @@ void MainWindow::writeSidecarForModel(uint32_t mid) {
viewport_->applyLodExtension(mid, sd);
QElapsedTimer t; t.start();
bool ok = writeSidecar(loader_->filePath(mid).toStdString(), sd, loader_->fileSize(mid));
bool ok = writeSidecar(loader_->filePath(mid).toStdString(), sd);
qDebug(" Sidecar write: %lld ms (%s)", t.elapsed(), ok ? "ok" : "FAILED");
}