kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24094
Re: [PATCH] DIALOG_SHIM default event handler fixes.
I've grumbled about it quite a few times in the past but now it's
official. :) I'll update the UI policy when I get a chance.
On 4/11/2016 8:11 AM, Chris Pavlina wrote:
> I thought you declared that policy a while ago :)
>
> On Apr 8, 2016 4:39 PM, "Wayne Stambaugh" <stambaughw@xxxxxxxxx
> <mailto: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
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
References