0028647: Visualization, OpenGl_AspectMarker - invalid marker size on re-setting aspec...
[occt.git] / src / OpenGl / OpenGl_AspectMarker.cxx
index b1fd2c7..a2899f5 100644 (file)
@@ -1605,9 +1605,17 @@ void OpenGl_AspectMarker::Resources::BuildSprites (const Handle(OpenGl_Context)&
     }
     SpriteAKey = aNewKeyA;
   }
+
+  if (!aNewResource)
+  {
+    if (!Sprite->IsDisplayList())
+    {
+      theMarkerSize = Standard_ShortReal (Max (Sprite->SizeX(), Sprite->SizeY()));
+    }
+    return;
+  }
   if (theType == Aspect_TOM_POINT
    || theType == Aspect_TOM_EMPTY
-   || !aNewResource
    || (theType == Aspect_TOM_USERDEFINED && theMarkerImage.IsNull()))
   {
     // nothing to do - just simple point