Salome HOME
Fix for the bug #42: point C is not activated, but point C is shown in preview in...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Shape.cxx
index 4eaecc5163153195a3025225e1ae463682acbad9..9a6c0ca700144bd562ff588259b0508e277063a9 100644 (file)
@@ -106,7 +106,7 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer )
   // Try to retrieve information from object
   if ( !myObject.IsNull() )
   {
-    Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myObject );
+    Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myObject->Label() );
   
     if ( myObject->IsKind( STANDARD_TYPE(HYDROData_ImmersibleZone) ) )
     {
@@ -162,7 +162,15 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer )
       }
        
       setFace( aZoneFace, false, false );
-      setFillingColor( HYDROGUI_Tool::GenerateFillingColor( aDocument, aGeomObjectsNames ) );
+      if (aZone->IsMergingNeed() && aZone->GetMergeType() == HYDROData_Zone::Merge_UNKNOWN )
+      {
+        // Red color for a zone with bathymetry conflict
+        setFillingColor( Qt::red );
+      }
+      else
+      {
+        setFillingColor( HYDROGUI_Tool::GenerateFillingColor( aDocument, aGeomObjectsNames ) );
+      }
     }
     else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_Image) ) )
     {