> Angus Leeming wrote: > > Richard Heck wrote: > >> For some reason, changing the type of the dialog switches the default > >> button from OK to Cancel. This restores the correct default. Must be a > >> QT bug. > >> > >> Still seeking two OKs...or at least some reaction! > > The button is changed because the GUI view is telling the > > ButtonController that the state of one of the widgets has changed. > > That's because listingsGB is emitting a signal when its own state is > > changed and this signal is connected to some slot that contains code > > to communicate the change of state to the ButtonController. > I don't think this is the cause. Do this: Open a new file; put in a > listings include. Now open the include dialog and, after it opens, hit > escape. Click on the listings inset, enter some text into the caption > field, and hit return. This will work: OK is still the default button. > Now open the include dialog again and do nothing but hit "Close". Now OK > is not the default button. This seems to be caused by the tour through > ButtonPolicies.cpp. But I do not understand that code. > I've looked into this a bit more. I thought for a bit that what was going on here was that slotClose() was eventually sending us to OkApplyCancelReadOnlyPolicy::input(SMI_CANCEL) and that is resetting the output state to INITIAL. But I don't see how that could change the default button, in the sense of Qt. And looking at the framestack when we hit slotClose(), I don't see any involvement of anything other than the Qt classes.
Richard -- ================================================================== Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ ================================================================== Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto -- ================================================================== Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ ================================================================== Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto