From: vsv Date: Thu, 25 Jul 2019 12:38:23 +0000 (+0300) Subject: Issue #2966: Redisplay text field on preferences change X-Git-Tag: VEDF2019Lot4~92 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=55f30f9d166a949862bb81c985f3e3460e505ea7;p=modules%2Fshaper.git Issue #2966: Redisplay text field on preferences change --- diff --git a/src/PartSet/PartSet_FieldStepPrs.cpp b/src/PartSet/PartSet_FieldStepPrs.cpp index c32bec26d..8fb605186 100644 --- a/src/PartSet/PartSet_FieldStepPrs.cpp +++ b/src/PartSet/PartSet_FieldStepPrs.cpp @@ -73,12 +73,6 @@ PartSet_FieldStepPrs::PartSet_FieldStepPrs(FieldStepPtr theStep) aDrawer->SetPointAspect( new Prs3d_PointAspect(Aspect_TOM_POINT, Quantity_NOC_YELLOW, POINT_SIZE)); } - SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr(); - QColor aQColor = aResMgr->colorValue("Viewer", "scalar_bar_text_color", Qt::black); - - myLabelColor = Quantity_Color(aQColor.redF(), aQColor.greenF(), aQColor.blueF(), - Quantity_TOC_RGB); - SetMaterial(Graphic3d_NOM_PLASTIC); } @@ -148,6 +142,10 @@ void PartSet_FieldStepPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) { SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr(); + QColor aQColor = aResMgr->colorValue("Viewer", "scalar_bar_text_color", Qt::black); + Quantity_Color aLabelColor = Quantity_Color(aQColor.redF(), aQColor.greenF(), aQColor.blueF(), + Quantity_TOC_RGB); + ModelAPI_AttributeTables::ValueType aType = dataType(); DataPtr aData = myFeature->data(); switch (aType) { @@ -204,7 +202,7 @@ void PartSet_FieldStepPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t Handle(Graphic3d_AspectText3d) anAspectText3d = new Graphic3d_AspectText3d(); anAspectText3d->SetStyle(Aspect_TOST_ANNOTATION); - anAspectText3d->SetColor(myLabelColor); + anAspectText3d->SetColor(aLabelColor); aGroup->SetPrimitivesAspect(anAspectText3d); int aT = aResMgr->integerValue("Viewer", "scalar_bar_text_height", 14); diff --git a/src/PartSet/PartSet_FieldStepPrs.h b/src/PartSet/PartSet_FieldStepPrs.h index f7711ddcd..f9a386264 100644 --- a/src/PartSet/PartSet_FieldStepPrs.h +++ b/src/PartSet/PartSet_FieldStepPrs.h @@ -66,7 +66,6 @@ private: FieldStepPtr myStep; FeaturePtr myFeature; - Quantity_Color myLabelColor; }; #endif