Salome HOME
It removes obsolete code. In Mirror constraint setFlushed should not be called as...
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Radius.cpp
index 5d7135e063f274502802d781487822bb1efcab9c..c08d7ab9430db8523b308bc025595686ec6a360f 100644 (file)
@@ -32,11 +32,11 @@ SketcherPrs_Radius::SketcherPrs_Radius(ModelAPI_Feature* theConstraint,
   myAspect->MakeText3d(false);
   myAspect->MakeTextShaded(false);
   myAspect->MakeUnitsDisplayed(false);
-  myAspect->TextAspect()->SetHeight(MyTextHeight);
+  myAspect->TextAspect()->SetHeight(SketcherPrs_Tools::getDefaultTextHeight());
   myAspect->ArrowAspect()->SetLength(SketcherPrs_Tools::getArrowSize());
   
   SetDimensionAspect(myAspect);
-  SetSelToleranceForText2d(MyTextHeight);
+  SetSelToleranceForText2d(SketcherPrs_Tools::getDefaultTextHeight());
 }
 
 
@@ -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);
 }