Skip to content
  • Nicolas Vuaille's avatar
    vtkSMTransferFunctionPresets become a singleton · 0000c0c3
    Nicolas Vuaille authored
    Rationale : it was possible to have multiple instance at some point.
    (typically, the pqChoosePresetReaction, through a pqSavePresetDialog, has a long-live
    vtkSMTransferFunctionPresets instance)
    But as they used to ignore each other and write the preset file in the destructor,
    modifying both instance was not well supported (in fact, file will represent the last destroyed one).
    
    Now it is a singleton, so no more sync problem. Two new methods were added to force the writing
    (`SaveToFile()`) and the reading (`ReloadPresets()`) of the preset file, if needed.
    0000c0c3