Salome HOME
Merge branch 'BR_1328' into BR_DEMO
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ShapeBathymetry.cxx
index 75542ee3be2fe53bbf5e461d2e8ac94e1bfb9f2f..cf9a3681c99a0a7007b8fb5800bd7e4057bd87f9 100644 (file)
@@ -70,7 +70,7 @@ Handle(AIS_InteractiveObject) HYDROGUI_ShapeBathymetry::createShape() const
   Handle(HYDROData_Bathymetry) aBath = Handle(HYDROData_Bathymetry)::DownCast( getObject() );
   if( !aBath.IsNull() )
   {
-    aPntCloud = new HYDROGUI_BathymetryPrs();
+    aPntCloud = new HYDROGUI_BathymetryPrs( this );
     //aPntCloud->SetHilightMode( AIS_PointCloud::DM_BndBox );
     aPntCloud->Attributes()->SetPointAspect (new Prs3d_PointAspect (Aspect_TOM_POINT, Quantity_NOC_WHITE, 2.0));
 
@@ -228,6 +228,7 @@ void HYDROGUI_ShapeBathymetry::Rescale( double theMin, double theMax )
   getContext()->ClearSelected();
   myMin = qMin( theMin, theMax );
   myMax = qMax( theMin, theMax );
+  setToUpdateColorScale( true );
   getAISObject()->Redisplay();
 }
 
@@ -269,7 +270,10 @@ void HYDROGUI_ShapeBathymetry::TextLabels( bool isOn )
   if( prs.IsNull() )
     return;
 
-  QList<int> selection = selected();
+  QList<int> selection;
+  if( isOn )
+    selection = selected();
+
   getContext()->ClearSelected();
   prs->SetTextLabels( selection );
   getAISObject()->Redisplay();