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")) { // 异常