Feature abstractionsaving final
requested to merge guillembartrina/purr-data:feature_abstractionsaving_final into feature-abstractionsaving
Allow the user to save subpatches in a separate pd file.
- Add "Save as" option to the pop-up menu. Available when right-clicking on pd subpatch objects or on the background of their canvases.
- A filechooser appears for the user to choose the destination.
- Once the destination is chosen, a dialog appears asking if the user wants to replace either none, only the saved one or all identical subpatches (within the subpatch tree, not crossing file boundaries) by the corresponding abstraction.
-
To instantiate the abstractions, the relative path will be always used unless there is some nameclash that prevents pd from instantiating the correct abstraction, in which case the absolute path will be used.
-
This feature does not have full undo support. Undo is just undoing all the replacements made in the current patch.
Known bugs:
- The object (struct) that handles the whole process is not released (so it remains in memory) if the user clicks "Cancel" in the filechooser, when choosing the destination -> No clean solution found so far.