easyw / kicad-action-tools

kicad action plugin tools
GNU General Public License v2.0
96 stars 19 forks source link

Kicad process doesn't exit cleanly after using the plugins #9

Open qu1ck opened 2 years ago

qu1ck commented 2 years ago

In wxWidgets the main event loop doesn't end unless all top level windows are destroyed. Your plugin doesn't destroy it's dialog window properly and it prevents kicad.exe from exiting.

Always call dialog.Destroy, after Show() or ShowModal(), best to do it in a finally block.

Also no need to do both Show() and ShowModal(), just ShowModal() has same effect.

easyw commented 2 years ago

@qu1ck thanks for the suggestions... I'll update the tools accordingly

easyw commented 2 years ago

@qu1ck I'm doing some tests... is there a way to check if the dialog isn't closed correctly and the process doesn't close clean?

qu1ck commented 2 years ago

Check in task manager (or ps -aux | grep kicad) after closing all kicad windows. If dialog is not destroyed the process will remain running.