return Quantity_Color();
}
- if( !myTable.IsNull() && myTable->HasType( theStricklerType ) )
- {
- QColor aColor = myTable->GetColor( theStricklerType );
- return HYDROData_Tool::toOccColor( aColor );
- }
+ QColor aColor = HYDROData_Document::Document( myLCMap->Label())->GetAssociatedColor(theStricklerType, myTable);
- HYDROData_Iterator anIt( HYDROData_Document::Document( myLCMap->Label() ), KIND_STRICKLER_TABLE );
- for( ; anIt.More(); anIt.Next() )
- {
- Handle(HYDROData_StricklerTable) aTable = Handle(HYDROData_StricklerTable)::DownCast( anIt.Current() );
- if( aTable->HasType( theStricklerType ) )
- {
- QColor aColor = aTable->GetColor( theStricklerType );
- return HYDROData_Tool::toOccColor( aColor );
- }
- }
-
- return Quantity_Color();
+ if (aColor.isValid())
+ return HYDROData_Tool::toOccColor(aColor);
+ else
+ return Quantity_Color();
}
void HYDROGUI_LandCoverMapPrs::Compute( const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,