"SerializeEditorState" doesn't save UI size in DAW project?

I’ve had some users complain that my plugin UI does not save it’s size when a DAW project is closed and re-opened. It appears that “SerializeEditorState” should be doing that - but it’s not.

How can I make this happen - i.e., save current UI size in the DAW project the same way it saves all the current parameter settings?

You can add the screen scale to your arbitrary serialized data in SerializeState.
Get the scale factor with GetUI()->GetDrawScale().
When unserializing you can call GetUI()–>Resize(GetUI()–>Width(), GetUI()–>Height(), scale);
There may be other solutions…

Thank you - will look into it.

Curious why IPlug doesn’t do this (save the current UI size) by default as part of the UI state?

1 Like

Wow - I don’t remember asking this on GitHub - must be time for a break.

Thank you for the link/reminder.