]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Porting Salome to OCCT 7.7.0
authorjfa <jfa@opencascade.com>
Mon, 13 Mar 2023 10:48:40 +0000 (10:48 +0000)
committerjfa <jfa@opencascade.com>
Mon, 13 Mar 2023 10:48:40 +0000 (10:48 +0000)
src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp

index 3d0fe58e66adceba46271b28cd602e3ebbf08b90..7e497ada8245e6ee7a84fdafbf882baec20ae520 100644 (file)
@@ -47,6 +47,8 @@
 #include <PrsDim_AngleDimension.hxx>
 #include <BRepExtrema_DistShapeShape.hxx>
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <iomanip>
 #include <sstream>
 #include <array>
@@ -617,6 +619,12 @@ void FeaturesPlugin_Measurement::setupDimension(AISObjectPtr theDim)
     std::string aFont = Config_PropManager::string("Visualization", "dimension_font");
 
     Handle(Prs3d_DimensionAspect) anAspect = aDim->DimensionAspect();
+#if OCC_VERSION_LARGE >= 0x07070000
+    if (anAspect.IsNull()) {
+      aDim->Attributes()->SetupOwnDefaults();
+      anAspect = aDim->DimensionAspect();
+    }
+#endif
     anAspect->MakeArrows3d(false);
     anAspect->MakeText3d(false);
     anAspect->MakeTextShaded(false);