On Tue, Jun 5, 2018 at 8:08 AM, <[email protected]> wrote: > Hi, > > To help in tagging, I managed to make a script/widget that allows to keep > track of recently used tags and recently used tag filters in comboboxes. > This means that the entire content of the combobox gets rearranged in > changed_callback so that the most recently used value sits on the top and > earlier values get pushed downwards. > > However, I had to struggle quite a while to find a solution to the first > problem in the title. When selecting a value from the combobox the > change_callback gets triggered twice. So I had to add a check for whether > this is the 1st or 2nd time the callback gets triggered, because otherwise > I easily ended up in an endless loop… Because the callback gets also > triggered when combobox.selected is set programmatically. > > Question 1: Is this by design? Would it be possible to make the callback > trigger only once? Also, would it be possible to prevent the callback being > triggered if the combobox.selected has been set from script? > Don't set selected after you update the combobox choices
> Question 2: Is there a way to make text written into a combobox not to > scale with the size of the list? Now the text is almost invisible if there > are less than 2 entries in the list and then grows to huge if the list is > long. > I tried creating the font scaling issue but wasn't able to. I tried a few entries, many entries, long, short, etc with no change in font size. If you want to attach your code, I'll look at it and see if I can find what is causing it. > With best regards, > > alpestris (darktable newbie) > Bill > > ___________________________________________________________________________ > darktable developer mailing list to unsubscribe send a mail to > [email protected] > ___________________________________________________________________________ darktable developer mailing list to unsubscribe send a mail to [email protected]
