Salome HOME
Merge remote-tracking branch 'origin/uhz/padder_bug_fix_rmaxrmin' into V8_3_BR V8_3_0rc3
authorrnv <rnv@opencascade.com>
Mon, 24 Apr 2017 15:34:04 +0000 (18:34 +0300)
committerrnv <rnv@opencascade.com>
Mon, 24 Apr 2017 15:34:04 +0000 (18:34 +0300)
src/OBJECT/SMESH_ScalarBarActor.cxx
src/SMESH_I/SMESH_Gen_i_1.cxx

index 1f5b00b63a5ee13e16f5c72587cd3addce35024e..a45696d7e9a4e6059276eb03d76a41930f92f374 100644 (file)
@@ -578,15 +578,18 @@ int SMESH_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
       
       // rnv begin
       // Customization of the vtkScalarBarActor to show distribution histogram.
-      if(myDistributionColoringType == SMESH_MULTICOLOR_TYPE && GetDistributionVisibility() && distrVisibility)
-        {
-          rgb = distColors->GetPointer(3*dcCount); //write into array directly
-          rgb[0] = rgba[0];
-          rgb[1] = rgba[1];
-          rgb[2] = rgba[2];
-          dcCount++;
-        }
+      if ( myDistributionColoringType == SMESH_MULTICOLOR_TYPE &&
+           GetDistributionVisibility() &&
+           distrVisibility &&
+           myNbValues[i] > 0 )
+      {
+        rgb = distColors->GetPointer(3*dcCount); //write into array directly
+        rgb[0] = rgba[0];
+        rgb[1] = rgba[1];
+        rgb[2] = rgba[2];
+        dcCount++;
       }
+    }
 
     // Now position everything properly
     //
index 0ae519858445d8010d3d65fe5397a65cef971250..b08b7e3e6d35d8b09a536a17ca8b5b5e75a68af5 100644 (file)
@@ -277,6 +277,10 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr   theStudy,
       SO = aStudyBuilder->NewObjectToTag( theFatherObject, theTag );
       isNewSO = true;
     }
+    else
+    {
+      isInUseCaseTree = useCaseBuilder->IsUseCaseNode( SO );
+    }
   }
   else
   {