Size is not saved with patch for some resizable modules, Cardinal VST3 (main) 23.02, REAPER v6.78, Windows 11
Some modules such as JW Modules Full Scope and Tree can be resized. However, they will reset when saving and loading the same preset/patch. The issue may be related to #415 where the text editor will shift other modules to its left or right if it was resized before saving and loading the same preset/patch, looking as though the module's size had reset.
Steps to reproduce:
- Load either JW Modules Full Scope or Tree, and resize to make longer
- Save as / Export the preset
- Open / Import the same preset
Expected behavior: the module's size remains the same as it was when the preset/patch was saved.
Reproduced in Cardinal VST3 (main) 23.02, REAPER v6.78, Windows 11.
Somehow I missed this one, just confirmed that with latest Cardinal this still happens. In VCV Rack this size is correctly restored, so definitely something in Cardinal that is going wrong.
The width is stored inside the data object in the patch:
"data": {
"lissajous": 1,
"external": 0,
"width": 780.0
},
So from what I can tell a module should load its data when it implements the dataFromJson() method, which the JW-Modules FullScope certainly does: https://github.com/jeremywen/JW-Modules/blob/master/src/FullScope.cpp#L78-L80
I believe that gets called here: https://github.com/VCVRack/Rack/blob/8c6f41b778b4bf8860b89b36d5503fd37924077f/src/engine/Module.cpp#L156-L206
Still not sure why this doesn't work correctly in Cardinal though, just some breadcrumbs ..
It might be an interesting experiment to see if lissajous and external also are no longer restored correctly after being changed/saved/loaded.
@cosinekitty it seems that Lissajous Mode (which I assume what lissajous setting in the data is) does get restored!