Angus Leeming wrote:
> Rob Lahaye wrote:
>>Argh, the double click in this dialog does not work properly
>>anymore, for obscure reasons. My patch is still valid to allow
>>double-clicking, though.
>>
> 
> In that case, does fl_redraw_object(your_ob) help. Or perhaps 
> fl_redraw_form, if you have to hit it with a hammer
> Try it and see.

Ok, done that, to no avail.
Are we at another Xforms bug here?

This is the code that causes the trouble (BibTeX.C around
line 126):

        } else if (ob == dialog_->browser_styles && ob_value == 2) {
                // double clicked in styles browser
                string const style = getString(dialog_->browser_styles);
                if (style.empty()) {
                        return ButtonPolicy::SMI_NOOP;
                } else {
                        fl_set_input(dialog_->input_style,
                                        ChangeExtension(style, "").c_str());
cout << "I have set dialog_->input_style to " << ChangeExtension(style, "") << endl;
                        fl_redraw_object(dialog_->input_style);
                        fl_redraw_form(form());
                }
                // reset the browser so that the following
                // single-click callback doesn't do anything
                fl_deselect_browser(dialog_->browser_styles);

        } else if (ob == dialog_->button_rescan) {


I have added the cout to be sure the input_style field is set
by the proper string.

Attached is a screenshot of what I get. It shows the BibTeX
Database dialog and the xterminal from where I've started LyX.
You can see in the xterminal that I have double-clicked on several
styles, but none of those appear in the style input field,
despite me using fl_redraw_object() and fl_redraw_form().
BTW: the latter redraw does not cause any flicker at all.

I'm using xforms-1.0_3 on FreeBSD.

Regards,
Rob.

<<inline: DoubleClickBug.png>>

Reply via email to