Bug fix; ensure that all is Ok after the combox is moved with

fl_set_object_position et al.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8702 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2004-04-28 10:21:37 +00:00
parent 3432599a35
commit d68ec28906
2 changed files with 24 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-04-28 Angus Leeming <leeming@lyx.org>
* combox.c (combox_handle): reset the x,y data for the sub-objects
on receipt of an FL_DRAWLABEL event. Ensures that all is Ok
after the combox has been re-positioned with fl_set_object_position.
2004-04-19 Angus Leeming <leeming@lyx.org>
* FormPreferences.C:

View File

@ -374,10 +374,26 @@ combox_handle(FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my, int key,
case FL_DRAW:
attrib_change(ob->spec);
/* Fall through */
case FL_DRAWLABEL:
case FL_DRAWLABEL: {
COMBOX_SPEC * sp = ob->spec;
FL_Coord const xbs =
ob->x + (sp->button_state->x - sp->button_chosen->x);
if (ob->x != sp->button_chosen->x ||
ob->y != sp->button_chosen->y ||
xbs != sp->button_state->x ||
ob->y != sp->button_state->y) {
fl_freeze_form(ob->form);
fl_set_object_position(sp->button_chosen, ob->x, ob->y);
fl_set_object_position(sp->button_state, xbs, ob->y);
fl_unfreeze_form(ob->form);
}
fl_draw_object_label(ob);
break;
case FL_SHORTCUT:
} case FL_SHORTCUT:
show_browser(ob->spec);
break;
case FL_FREEMEM: {