]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Modify point size for non-strings presentations only
authorvsv <vsv@opencascade.com>
Wed, 3 Jul 2019 10:07:29 +0000 (13:07 +0300)
committervsv <vsv@opencascade.com>
Wed, 3 Jul 2019 10:07:29 +0000 (13:07 +0300)
src/PartSet/PartSet_FieldStepPrs.cpp

index 1d751d01695a3ca6fdced1bf2db90dc9d1a0a0c1..04d74504eb84f1e1d1714795e2b6e240bfbf4a66 100644 (file)
@@ -63,15 +63,16 @@ PartSet_FieldStepPrs::PartSet_FieldStepPrs(FieldStepPtr theStep)
   std::shared_ptr<ModelAPI_ResultField> aFieldPtr(aField, emptyDeleter);
   myFeature = ModelAPI_Feature::feature(aFieldPtr);
 
-  Handle(Prs3d_Drawer) aDrawer = Attributes();
-  if (aDrawer->HasOwnPointAspect()) {
-    aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_POINT);
-    aDrawer->PointAspect()->SetScale(POINT_SIZE);
+  if (dataType() != ModelAPI_AttributeTables::STRING) {
+    Handle(Prs3d_Drawer) aDrawer = Attributes();
+    if (aDrawer->HasOwnPointAspect()) {
+      aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_POINT);
+      aDrawer->PointAspect()->SetScale(POINT_SIZE);
+    }
+    else
+      aDrawer->SetPointAspect(
+        new Prs3d_PointAspect(Aspect_TOM_POINT, Quantity_NOC_YELLOW, POINT_SIZE));
   }
-  else
-    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);