fix(3d): 右键色阶去省略号 + 关闭切片取消列表勾选 + 异常取消选中清高亮
1) 数据列表三维体/切片右键「色阶…」→「色阶」(去省略号)。
3) VTK 右键关闭已保存切片后,数据列表仍勾选:onSliceClosed 此前从未连接 → 接 setChecked(dsId,false)。
4) 异常取消选中(选别的对象/点 VTK 空白)后异常图形仍高亮:
- 选中非异常对象 → setSelectedAnomaly("") 清异常高亮;
- onSliceSelectionChanged 收到空 dsId(点空白/清选) → 一并清异常高亮。
构建:app 链接通过
This commit is contained in:
parent
1a70ca0072
commit
b48684a0ba
|
|
@ -975,19 +975,31 @@ void buildWorkbench(QMainWindow& window, geopro::data::LocalSampleRepository& re
|
|||
[sceneView, interactionMgr, renderWindowPtr](const QString& dsId,
|
||||
const QString& ddCode) {
|
||||
const std::string id = dsId.toStdString();
|
||||
if (ddCode == QStringLiteral("dd_anomaly"))
|
||||
if (ddCode == QStringLiteral("dd_anomaly")) {
|
||||
sceneView->setSelectedAnomaly(id);
|
||||
else if (ddCode == QStringLiteral("dd_slice"))
|
||||
interactionMgr->selectSavedSlice(id); // 选中已渲染的该切片(高亮)
|
||||
} else {
|
||||
sceneView->setSelectedAnomaly(std::string{}); // 选中非异常对象→清异常高亮
|
||||
if (ddCode == QStringLiteral("dd_slice"))
|
||||
interactionMgr->selectSavedSlice(id); // 选中已渲染的该切片(高亮)
|
||||
}
|
||||
renderWindowPtr->Render();
|
||||
});
|
||||
// 反向 VTK→list:在 VTK 里点中/选中一张切片 → 在三维体段树里同步选中该切片行(②反向)。
|
||||
interactionMgr->onSliceSelectionChanged = [drawer](const std::string& dsId) {
|
||||
// 点空白/清选(dsId 空) → 一并清 VTK 异常高亮(否则取消选中后异常图形仍高亮,用户反馈)。
|
||||
interactionMgr->onSliceSelectionChanged = [drawer, sceneView, renderWindowPtr](
|
||||
const std::string& dsId) {
|
||||
if (auto* sec = drawer->analysisTab()->section("voxel"))
|
||||
sec->selectItem(QString::fromStdString(dsId));
|
||||
if (dsId.empty()) {
|
||||
sceneView->setSelectedAnomaly(std::string{});
|
||||
renderWindowPtr->Render();
|
||||
}
|
||||
};
|
||||
// 已保存切片经 VTK 右键「关闭」→ 取消数据列表对应切片项的勾选(否则列表仍勾选,用户反馈)。
|
||||
interactionMgr->onSliceClosed = [drawer](const std::string& dsId) {
|
||||
if (auto* sec = drawer->analysisTab()->section("voxel"))
|
||||
sec->setChecked(QString::fromStdString(dsId), false);
|
||||
};
|
||||
// 异常双击属性(R83)/右键删除已并入 analysisTab 的 detailRequested(dd_anomaly) /
|
||||
// deleteDatasetRequested(dd_anomaly);列表选中→VTK高亮(R84)随旧栏退役暂缺,待新段补 anomalySelected。
|
||||
|
||||
// ── 二维数据集栏:天地图底图开关(③,复用轨迹图 token,经同一共享 GeoLocalFrame 配准)──
|
||||
auto* basemap = new geopro::app::TileBasemap(*scene, renderWindowPtr, frame, &window);
|
||||
|
|
|
|||
|
|
@ -343,14 +343,14 @@ void CategorySection::showContextMenu(const QPoint& pos) {
|
|||
sl->addAction(QStringLiteral("前后"), this, [this, id] { emit sliceRequested(SliceAxis::FrontBack, id); });
|
||||
sl->addAction(QStringLiteral("左右"), this, [this, id] { emit sliceRequested(SliceAxis::LeftRight, id); });
|
||||
sl->addAction(QStringLiteral("任意"), this, [this, id] { emit sliceRequested(SliceAxis::Oblique, id); });
|
||||
menu.addAction(QStringLiteral("色阶…"), this, [this, id] { emit colorScaleRequested(id); });
|
||||
menu.addAction(QStringLiteral("色阶"), this, [this, id] { emit colorScaleRequested(id); });
|
||||
} else if (ddCode == QStringLiteral("dd_slice")) { // 切片
|
||||
menu.addAction(QStringLiteral("保存位姿"), this, [this, id] { emit sliceSaveRequested(id); });
|
||||
menu.addAction(QStringLiteral("另存为…"), this, [this, id] { emit sliceSaveAsRequested(id); });
|
||||
QMenu* ex = menu.addMenu(QStringLiteral("导出"));
|
||||
ex->addAction(QStringLiteral("图片"), this, [this, id] { emit sliceExportImageRequested(id); });
|
||||
ex->addAction(QStringLiteral("dat"), this, [this, id] { emit sliceExportDatRequested(id); });
|
||||
menu.addAction(QStringLiteral("色阶…"), this, [this, id] { emit colorScaleRequested(id); });
|
||||
menu.addAction(QStringLiteral("色阶"), this, [this, id] { emit colorScaleRequested(id); });
|
||||
menu.addSeparator();
|
||||
menu.addAction(QStringLiteral("删除"), this, [this, id, ddCode] { emit deleteDatasetRequested(id, ddCode); });
|
||||
} else if (ddCode == QStringLiteral("dd_anomaly")) { // 异常
|
||||
|
|
|
|||
Loading…
Reference in New Issue