hgonomeg / coot

Software for macromolecular model-building
http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/
GNU General Public License v3.0
0 stars 0 forks source link

Fit Loop Rama Search: combobox has no active item #27

Closed hgonomeg closed 2 years ago

hgonomeg commented 2 years ago

Many dialogs use a molecule combobox to ask the user on which molecule they wish to operate, so this needs to be regenerated as the dialog is opened.

In graphics-info-gui.cc there is a function that attempts to fill a combobox: void

graphics_info_t::new_fill_combobox_with_coordinates_options(GtkWidget *combobox_molecule,
GCallback callback_func,
int imol_active)

I have been working on the Fit Loop Rama Search option, that uses this option. The combobox is filled with options - that's fine, but there is no "active item" - I can't work out how to set it. Please have a look and edit it or rewrite it.

Tasks

hgonomeg commented 2 years ago

It was a matter of set_active being called before set_model - combobox had no data when the call to set_active was attempted, which resulted in the function call taking no effect. Reordering these operations fixed it.