Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
ParaView
ParaView
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 2,004
    • Issues 2,004
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 58
    • Merge Requests 58
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ParaView
  • ParaViewParaView
  • Merge Requests
  • !3727

Merged
Opened Nov 25, 2019 by Nicolas Vuaille@nicolas.vuaille
  • Report abuse
Report abuse

vtkSMTransferFunctionPresets become a singleton

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.

Use case: I'm working on adding preset mechanism to ChartSeries (see wip !3589 (closed)), and I faced this problem were the ColorMap editor handles a vtkSMTransferFunctionPrests instance and the SeriesEditorPropertyWidget handle a second one.

Edited Nov 25, 2019 by Nicolas Vuaille
  • Discussion 29
  • Commits 2
  • Pipelines 7
  • Changes 10
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: paraview/paraview!3727

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.