From b48684a0bace113452b3121c1959ef245af089b6 Mon Sep 17 00:00:00 2001 From: gaozheng Date: Fri, 26 Jun 2026 14:06:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(3d):=20=E5=8F=B3=E9=94=AE=E8=89=B2=E9=98=B6?= =?UTF-8?q?=E5=8E=BB=E7=9C=81=E7=95=A5=E5=8F=B7=20+=20=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=88=87=E7=89=87=E5=8F=96=E6=B6=88=E5=88=97=E8=A1=A8=E5=8B=BE?= =?UTF-8?q?=E9=80=89=20+=20=E5=BC=82=E5=B8=B8=E5=8F=96=E6=B6=88=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E6=B8=85=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1) 数据列表三维体/切片右键「色阶…」→「色阶」(去省略号)。 3) VTK 右键关闭已保存切片后,数据列表仍勾选:onSliceClosed 此前从未连接 → 接 setChecked(dsId,false)。 4) 异常取消选中(选别的对象/点 VTK 空白)后异常图形仍高亮: - 选中非异常对象 → setSelectedAnomaly("") 清异常高亮; - onSliceSelectionChanged 收到空 dsId(点空白/清选) → 一并清异常高亮。 构建:app 链接通过 --- src/app/main.cpp | 24 ++++++++++++++++------ src/app/panels/columns/CategorySection.cpp | 4 ++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index 459d7e1..9f6e6e5 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -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); diff --git a/src/app/panels/columns/CategorySection.cpp b/src/app/panels/columns/CategorySection.cpp index f840b47..57cb3f7 100644 --- a/src/app/panels/columns/CategorySection.cpp +++ b/src/app/panels/columns/CategorySection.cpp @@ -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")) { // 异常