refactor(vtk): 帘面渲染改异步走 loadSection(QPointer+generation守护,对齐volume路径)(①.3)
This commit is contained in:
parent
2d155c864c
commit
2934bacd34
|
|
@ -103,7 +103,19 @@ void VtkSceneController::rebuildInternal() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (showCurtain_) {
|
if (showCurtain_) {
|
||||||
for (const auto& dsId : checkedDs_) view_.addCurtain(grid(dsId), colorScale(dsId));
|
for (const auto& dsId : checkedDs_) {
|
||||||
|
sceneRepo_.loadSection(
|
||||||
|
dsId,
|
||||||
|
[self, gen](data::SectionData s) {
|
||||||
|
if (!self || gen != self->rebuildGeneration_) return; // 已析构/迟到:丢弃
|
||||||
|
self->view_.addCurtain(s.grid, s.scale);
|
||||||
|
if (!self->inRebuild_) self->view_.render(false); // 同步路径由末尾统一 render
|
||||||
|
},
|
||||||
|
[self, gen](const std::string& m) {
|
||||||
|
if (!self || gen != self->rebuildGeneration_) return;
|
||||||
|
emit self->loadFailed(QString::fromStdString(m));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (showVoxel_) {
|
if (showVoxel_) {
|
||||||
for (const auto& dsId : checkedDs_) {
|
for (const auto& dsId : checkedDs_) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue