← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] DIALOG_SHIM default event handler fixes.

 

I thought you declared that policy a while ago :)
On Apr 8, 2016 4:39 PM, "Wayne Stambaugh" <stambaughw@xxxxxxxxx> wrote:

> I've known for a while that the quasi-modal mode provided by DIALOG_SHIM
> was broken.  The only reason it hasn't reared it's head is because of
> the design of most of dialogs.  If you call any dialog derived from
> DIALOG_SHIM using ShowQuasiModal() and allow the default button event
> handlers (wxID_OK, wx_ID_CANCEL, etc.) defined in wxDialogBase (see the
> common/dlgcmn.cpp file in the wxWidgets source) to be called, kicad will
> either crash or become stuck in the quasi-modal event loop requiring it
> to be killed by the OS.  You can test this for yourself by opening an
> HTML_MESSAGE_BOX dialog in the quasi-modal mode and either clicking the
> OK button or clicking the close button in the title bar.  The attached
> patch fixes these issues.  However, I would like some thorough testing
> on all platforms to make sure it doesn't break any other dialog behavior
> before I commit it.
>
> This bug is the final straw in our poor practice of directly handling
> default button events in our dialog code instead of using the correct
> wxDialog methods for transferring data between the controls in the
> dialog and the data structures and/or dialog class members.  Therefore,
> I am implementing a new policy.  Any new dialogs that directly handle
> default button events will be rejected.  As we modify existing dialogs,
> we should be fixing them accordingly so they can be shown as
> quasi-modal, modal, or mode-less without any modification.  Your help in
> this matter will be greatly appreciated.
>
> Cheers,
>
> Wayne
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References