X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Zone.cxx;h=3ec240f04002479255ce3a13a672ce8ba9d70c55;hb=5cae7e874afd2fc1b6f61023e8ebd33a933db3c7;hp=195afa157a1b47eb7d11a8cf9efdf4cea3dc3114;hpb=0c76593b1d11353467fe978da4ad99549c59899e;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Zone.cxx b/src/HYDROGUI/HYDROGUI_Zone.cxx index 195afa15..3ec240f0 100644 --- a/src/HYDROGUI/HYDROGUI_Zone.cxx +++ b/src/HYDROGUI/HYDROGUI_Zone.cxx @@ -90,7 +90,8 @@ QString HYDROGUI_Zone::getBathimetryName() const if ( !aZone.IsNull() ) { HYDROData_SequenceOfObjects aSeq = aZone->GetGeometryObjects(); - if ( aZone->IsMergingNeed() || aSeq.Length() == 1 ) + if ( ( aZone->IsMergingNeed() && aZone->GetMergeType() == HYDROData_Zone::Merge_UNKNOWN ) + || aSeq.Length() == 1 ) { // Collect all used bathymetries names when merging is necessary // or just get the name of bathymetry of a single geometry object @@ -159,25 +160,29 @@ QColor HYDROGUI_Zone::color( const ColorRole theColorRole, const int theColumnId { // Implement red color for bathymetry conflicts in case creation dialog QColor aRes; - if( isMergingNeed() ) + Handle(HYDROData_Zone) aZone = Handle(HYDROData_Zone)::DownCast( modelObject() ); + if ( !aZone.IsNull() ) { - switch( theColorRole ) + if ( ( aZone->IsMergingNeed() && aZone->GetMergeType() == HYDROData_Zone::Merge_UNKNOWN ) ) { - case Text: // editor foreground (text) color - case Foreground: // foreground (text) color - aRes = Qt::red; - break; - case HighlightedText: // highlighted foreground (text) color - aRes = Qt::black; - break; - case Base: // editor background color - case Background: // background color - case Highlight: // highlight background color - default: - aRes = Qt::red; + switch( theColorRole ) + { + case Text: // editor foreground (text) color + case Foreground: // foreground (text) color + aRes = Qt::red; + break; + case HighlightedText: // highlighted foreground (text) color + aRes = Qt::black; + break; + case Base: // editor background color + case Background: // background color + case Highlight: // highlight background color + default: + aRes = Qt::red; + } } } - else + if ( !aRes.isValid() ) { aRes = LightApp_DataObject::color( theColorRole, theColumnId ); }