Skip to content
  • Csaba Pinter's avatar
    Fixed control points clamp function to handle NaN value · bc627d83
    Csaba Pinter authored
    If the user clicks in a plot that has an invalid (0,0) range, then in vtkContextScene::ProcessItem that is called after mouse events, the mapped mouse position becomes NaN, due to invalid matrix in the ContextScene's transform. This NaN position is then added to the function as a control point with an invalid NaN value. This fix makes sure this does not happen, by clamping the NaN values to minimum bounds on x axis, and 0 on y axis (any value comparison returns false if an operand is NaN, so need to check explicitly).
    bc627d83