From 9b4f172809e8f361a1917742bc653cd753cb0fb0 Mon Sep 17 00:00:00 2001 From: gaozheng Date: Fri, 26 Jun 2026 23:43:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(3d-view):=20=E4=BA=8C=E7=BB=B4/=E4=B8=89?= =?UTF-8?q?=E7=BB=B4=E5=88=86=E6=9E=90=E5=88=87=E6=8D=A2=E6=97=B6=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=89=8D=E8=A7=86=E5=9B=BE=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 三维分析选中切片后切到二维分析,残留的selected_使InteractionManager::onWheel 持续消费滚轮(二维下无法缩放),且切回三维仍残留高亮。setMode2D进入二维时清切片 选中+高亮,并经onSliceSelectionChanged("")联动清三维分析列表选中行与异常高亮。 与VtkSceneView::setAnalysisMode2D离开二维时clearMapLineSelection清足迹选中相对称。 --- src/render/interact/InteractionManager.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/render/interact/InteractionManager.cpp b/src/render/interact/InteractionManager.cpp index 61c74fe..33baf68 100644 --- a/src/render/interact/InteractionManager.cpp +++ b/src/render/interact/InteractionManager.cpp @@ -263,6 +263,17 @@ void InteractionManager::closeAll() { PickInteractorStyle* InteractionManager::pickStyle() const { return style_; } void InteractionManager::setMode2D(bool is2D) { + // 进入二维分析:主动取消「三维前视图」的所有选中。否则残留的选中切片会让 onWheel 持续消费滚轮 + // (二维下无法缩放),且切回三维仍残留高亮。清 selected_ + 切片高亮;再经 onSliceSelectionChanged("") + // 联动清三维分析列表选中行与异常高亮(app 层接线)。与 VtkSceneView::setAnalysisMode2D 离开二维时 + // clearMapLineSelection 清足迹选中相对称。 + if (is2D) { + if (selected_ >= 0) { + selected_ = -1; + updateSelectionVisual(); // 清切片高亮(切回三维不残留选中) + } + if (onSliceSelectionChanged) onSliceSelectionChanged(std::string{}); + } // 切片属三维内容:二维分析隐藏(不销毁→切回零重建)、三维分析显示。 for (auto& s : slices_) if (s) s->setVisible(!is2D);