NCollection_Sequence<TCollection_AsciiString> aSectNames;
NCollection_Sequence<HYDROData_PolylineXY::SectionType> aSectTypes;
NCollection_Sequence<bool> aSectClosures;
- aPolyline->GetSections( aSectNames, aSectTypes, aSectClosures );
+ aPolyline->GetSections( aSectNames, aSectTypes, aSectClosures );
for ( int i = 1, n = aSectNames.Size(); i <= n; ++i )
{
bool aSectClosure = aSectClosures.Value( i );
aNewPolyline->AddSection(aSectName, aSectType, aSectClosure);
HYDROData_PolylineXY::PointsList aPointsList = aPolyline->GetPoints(i-1, false);
- aNewPolyline->SetPoints(ins++, aPointsList);
+ QColor sectColor;
+ aPolyline->getSectionColor(i-1, sectColor);
+ aNewPolyline->SetPoints(ins, aPointsList);
+ if (sectColor.isValid())
+ aNewPolyline->setSectionColor(ins, sectColor);
+ ins++;
}
}
QString aName = theName;