KeyWorksRW / wxUiEditor

RAD tool used to create and maintain wxWidgets UI elements.
Apache License 2.0
63 stars 7 forks source link

Add additional support for missing sizers when importing #1482

Closed Randalphwa closed 1 month ago

Randalphwa commented 1 month ago

There was already code that automatically adds a sizer to wxPanel for controls that don't have sizer parents. This commit extends that to include the form version of wxPanel as well as wxDialog.

This PR extends the special case when importing a project that does not have a sizer between a form and it's top level children. Previously, only the non-form version of wxPanel did this. It's now extended to the form version of wxPanel and wxDialog.

Note that while technically the sizer isn't needed, the Mockup panel as well as code generation fails without the expected sizer. So technically, this doesn't match the original intent, but it does allow the controls to be imported.

See issue #1478 for details of the problem.