Fix bad SetColor/GetColor interaction in vtkProperty.
The SetColor() method calls SetAmbientColor(), SetDiffuseColor(), and SetSpecularColor() and each of these can potentially trigger a ModifiedEvent. However, if the ModifiedEvent callback calls GetColor(), which it often will, this causes Bad Things to happen because GetColor() calls ComputeCompositeColor() which re-computes this->Color based on the values of AmbientColor, DiffuseColor, and SpecularColor. The fix is to make sure that Modified() is not called until all of the ivars have been set. Change-Id: I00a6799a1a9e31a6b28e102e11e4a6bd71f18d71
Showing with 29 additions and 9 deletions