From a92daa0737727ebf1b014b044577486a1ad9c7f8 Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 18 Sep 2018 12:55:56 +0300 Subject: [PATCH] Issue #2647: do not modify text size according to current window scale --- src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.2