python dump SetColor() only if the color changes

This commit is contained in:
eap 2011-11-03 14:07:53 +00:00
parent 2fb8ce8c74
commit aab884d201

View File

@ -582,8 +582,12 @@ void SMESH_GroupBase_i::SetColor(const SALOMEDS::Color& color)
if (aGroupDS)
{
Quantity_Color aQColor( color.R, color.G, color.B, Quantity_TOC_RGB );
aGroupDS->SetColor(aQColor);
TPythonDump()<<_this()<<".SetColor( SALOMEDS.Color( "<<color.R<<", "<<color.G<<", "<<color.B<<" ))";
Quantity_Color oldColor = aGroupDS->GetColor();
if ( oldColor != aQColor )
{
aGroupDS->SetColor(aQColor);
TPythonDump()<<_this()<<".SetColor( SALOMEDS.Color( "<<color.R<<", "<<color.G<<", "<<color.B<<" ))";
}
}
}