Am Dienstag, 5. Juni 2018, 14:08:38 CEST schrieb [email protected]: > Hi, > > To help in tagging, I managed to make a script/widget that allowsto keep > track of recently used tags and recently used tag filters incomboboxes. > This means that the entire content of the combobox getsrearranged in > changed_callback so that the most recently used valuesits on the top and > earlier values get pushed downwards. > > > However, I had to struggle quite a while to find a solution to thefirst > problem in the title. When selecting a value from the comboboxthe > change_callback gets triggered twice. So I had to add a check forwhether > this is the 1st or 2nd time the callback gets triggered,because otherwise I > easily ended up in an endless loop… Because thecallback gets also triggered > when combobox.selected is setprogrammatically. > > Question 1: Is this by design? Would it be possible to make thecallback > trigger only once? Also, would it be possible to prevent thecallback being > triggered if the combobox.selected has been set fromscript?
You have to block/unblock the callback. Grep the code, there are plenty of examples how that works. > Question 2: Is there a way to make text written into a comboboxnot to scale > with the size of the list? Now the text is almostinvisible if there are > less than 2 entries in the list and then growsto huge if the list is long. I am not sure what you mean. Please take a screenshot, upload them somewhere and put a link into your reply. Attachments tend to upset people. > With best regards, > > alpestris (darktable newbie) Tobias
signature.asc
Description: This is a digitally signed message part.
