From f2b6c69e7391c128140bf926ebbd85249c5b1654 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 28 May 2015 15:00:52 +0300 Subject: [PATCH] Do not use standard modes in these presentation Scenario: in mirror list a dimension text is selectable. --- src/SketcherPrs/SketcherPrs_LengthDimension.cpp | 10 ++++++++-- src/SketcherPrs/SketcherPrs_Radius.cpp | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp index 99cd15c37..9a4509794 100644 --- a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp +++ b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp @@ -160,6 +160,9 @@ void SketcherPrs_LengthDimension::ComputeSelection(const Handle(SelectMgr_Select { Standard_Integer aMode; switch (theMode) { + case 0: // we should use selection of all objects + aMode = 0; + break; case SketcherPrs_Tools::Sel_Dimension_All: aMode = 0; break; @@ -169,8 +172,11 @@ void SketcherPrs_LengthDimension::ComputeSelection(const Handle(SelectMgr_Select case SketcherPrs_Tools::Sel_Dimension_Text: aMode = 2; break; - default: - aMode = theMode; + default: { + // there are own selection modes, so the others should be ignored + // otherwise, the text selection appears in the viewer + return; + } } AIS_LengthDimension::ComputeSelection(aSelection, aMode); } diff --git a/src/SketcherPrs/SketcherPrs_Radius.cpp b/src/SketcherPrs/SketcherPrs_Radius.cpp index 5d7135e06..11eec0734 100644 --- a/src/SketcherPrs/SketcherPrs_Radius.cpp +++ b/src/SketcherPrs/SketcherPrs_Radius.cpp @@ -105,6 +105,9 @@ void SketcherPrs_Radius::ComputeSelection(const Handle(SelectMgr_Selection)& aSe { Standard_Integer aMode; switch (theMode) { + case 0: // we should use selection of all objects + aMode = 0; + break; case SketcherPrs_Tools::Sel_Dimension_All: aMode = 0; break; @@ -114,8 +117,11 @@ void SketcherPrs_Radius::ComputeSelection(const Handle(SelectMgr_Selection)& aSe case SketcherPrs_Tools::Sel_Dimension_Text: aMode = 2; break; - default: - aMode = theMode; + default: { + // there are own selection modes, so the others should be ignored + // otherwise, the text selection appears in the viewer + return; + } } AIS_RadiusDimension::ComputeSelection(aSelection, aMode); } -- 2.39.2