From: nds Date: Thu, 28 May 2015 12:00:52 +0000 (+0300) Subject: Do not use standard modes in these presentation X-Git-Tag: V_1.2.0~32 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f2b6c69e7391c128140bf926ebbd85249c5b1654;p=modules%2Fshaper.git Do not use standard modes in these presentation Scenario: in mirror list a dimension text is selectable. --- 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); }