Salome HOME
Task #3059 implementation: When “move to the end” of a group, propose to the user...
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_SymbolPrs.cpp
index a251d2539f357b9661c0747b1463877e38f25c2d..e10434cf9e3f024f5ee28610480786d44dc8e377 100644 (file)
@@ -185,7 +185,7 @@ Handle(Image_AlienPixMap) SketcherPrs_SymbolPrs::icon()
       aSizedMap->InitTrash(aPixMap->Format(), aWidth, aHeigh);
       for (Standard_Size i = 0; i < aWidth; i++) {
         for (Standard_Size j = 0; j < aHeigh; j++) {
-          aSizedMap->SetPixelColor(i, j, aPixMap->PixelColor(i / aRatio, j / aRatio));
+          aSizedMap->SetPixelColor(int(i), int(j), aPixMap->PixelColor(i / aRatio, j / aRatio));
         }
       }
       aPixMap = aSizedMap;
@@ -274,6 +274,8 @@ void SketcherPrs_SymbolPrs::Compute(
                 const Handle(Prs3d_Presentation)& thePresentation,
                 const Standard_Integer theMode)
 {
+  if (!plane().get())
+    return;
   // Create an icon
   prepareAspect();