From: vsv Date: Tue, 18 Sep 2018 09:55:56 +0000 (+0300) Subject: Issue #2647: do not modify text size according to current window scale X-Git-Tag: V9_2_0a1~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a92daa0737727ebf1b014b044577486a1ad9c7f8;p=modules%2Fshaper.git Issue #2647: do not modify text size according to current window scale --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp b/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp index c92896194..ee4d1ea1f 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp @@ -582,6 +582,7 @@ void FeaturesPlugin_Measurement::setupDimension(AISObjectPtr theDim) Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(aAIS); int aSize = Config_PropManager::integer("Visualization", "dimension_arrow_size"); int aTextSize = Config_PropManager::integer("Visualization", "dimension_value_size"); + std::string aFont = Config_PropManager::string("Visualization", "dimension_font"); Handle(Prs3d_DimensionAspect) anAspect = aDim->DimensionAspect(); anAspect->MakeArrows3d(false); @@ -589,9 +590,8 @@ void FeaturesPlugin_Measurement::setupDimension(AISObjectPtr theDim) anAspect->MakeTextShaded(false); anAspect->MakeUnitsDisplayed(false); anAspect->MakeUnitsDisplayed(false); - anAspect->TextAspect()->SetFont(Config_PropManager::string("Visualization", - "dimension_font").c_str()); - anAspect->TextAspect()->SetHeight(aTextSize / mySceenScale); + anAspect->TextAspect()->SetFont(aFont.c_str()); + anAspect->TextAspect()->SetHeight(aTextSize); anAspect->ArrowAspect()->SetLength(aSize / mySceenScale); anAspect->SetExtensionSize((aTextSize / mySceenScale + aSize) / 2.0); aDim->SetDimensionAspect(anAspect);