mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 19:30:25 +00:00
ifcviewer: load rdb/ifc as property data source on sidecar hit
Sidecar hits skipped opening the underlying .rdb/.ifc, so ifcFile() was null and the property panel only showed cached name/type/guid. Now, after a sidecar hit, a background thread opens <stem>.rdb (preferred) or <stem>.ifc and hands the file to GeometryStreamer via setIfcFile(), with a dataSourceReady signal so the UI refreshes the current selection. Gated behind a new AppSettings::loadDataSource toggle (default on) so users can opt into geometry-only viewing; when off, the sidecar-hit thread is skipped and the stream-path ifc_file_ is released after the sidecar write completes. Also adds *.ifcview to the Add Files dialog filter so a cache can be opened directly without its source file present. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,11 @@ public:
|
||||
void loadFile(const std::string& path, uint32_t start_object_id, uint32_t model_id, int num_threads = 0);
|
||||
void cancel();
|
||||
|
||||
// Adopt an externally-opened ifcopenshell::file as the data source
|
||||
// (e.g. for the sidecar-hit path, where loadFile never runs). The
|
||||
// streamer must not be running geometry iteration when this is called.
|
||||
void setIfcFile(std::unique_ptr<ifcopenshell::file> file);
|
||||
|
||||
bool isRunning() const { return running_.load(); }
|
||||
int progress() const { return progress_.load(); }
|
||||
uint32_t lastObjectId() const { return next_object_id_; }
|
||||
|
||||
Reference in New Issue
Block a user