Abdelrazak Younes wrote: > Richard Heck wrote: >> Richard Heck wrote: >>> One note: In order to get this to work right, I had to make the >>> dialog modal. The reason is this. Suppose you open the dialog on a >>> paragraph that allows Left, Right, and Block. Then you click in a >>> different paragraph that allows only Left and Block. Then the dialog >>> needs to update, but I couldn't find anything to hook to make it >>> happen. I tried implementing QParagraphDialog::focusInEvent, but >>> that didn't work. It seemed the focus event was being grabbed by a >>> widget before the dialog would see it, and implementing focusInEvent >>> for every widget in the dialog didn't seem a happy choice. Ideas >>> here are most welcome. >> I've figured that out and no longer have quite this problem. The >> question now is: Suppose I want the dialog to completely reset >> itself. What do I call? > initParams? I've found the real issue here. Suppose the dialog is open and the user clicks in a new paragraph. Then update_contents() is called by QView::update, which is called by Dialog::checkStatus, as well it should be. But nowhere along the way has initaliseParams() been called again, so the dialog gets updated on the basis of the original paragraph's parameters. This seems as if it could be quite a general problem. Should initParams() be called in QView::update()?
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
