• Utkarsh Ayachit's avatar
    BUG #14283. Fix change events fired by vtkControlPointsItem. · a6b0b0df
    Utkarsh Ayachit authored
    This commit consolidates the logic between all vtkControlPointsItem subclasses
    to consistently notify rest of the world that the control points were modified.
    Previously, commit 1509669d tried to do the same with
    vtkControlPointsItem::PointsModifiedEvent, however vtkCompositeControlPointsItem
    wasn't firing those consistently resulting in the BUG #14283.
    
    While attempting to fix that, I noticed that vtkControlPointsItem has
    StartChanges()/EndChanges() methods that could be used for a similar purpose:
    notify the world that control points are being changed. Hence, remved the
    PointsModifiedEvent, instead fixing the code to consistently use
    StartChanges()/EndChanges() calls.
    
    Fixed StartChanges/EndChanges to fire the event on the vtkControlPointsItem
    (along with tranfer function, as it was previously) and added logic to avoid
    duplicable firing of events due nested calls to StartChanges/EndChanges.
    
    Change-Id: I144e775cbdfbc9c1334cfc2b02609b37dda8cae7
    a6b0b0df
vtkColorTransferControlPointsItem.cxx 7.62 KB