4
$\begingroup$

Dropdown list does not redraw when search operator changes it’s EnumProperty.
Here is simple example script.
Use search operator and see how dropdown list updated only on mouseover.

enter image description here

Important notes:

  • Do not suggest to use redraw_timer—it’s not recommended by documentation
  • I do not specifically need this combination of UI elements, I just need to have dropdown list with keyword search, if there is another UI element or combination of elements that would better suit the purpose then I will gladly use them instead
  • Do not suggest template_list this is not what I’m looking for, as I said: simple dropdown list with keyword search
$\endgroup$
5
$\begingroup$

Ideally this would worth without any explicit update or redraw calls, however - this issue can be resolved by tagging the area for redraw.

After the assignment call context.area.tag_redraw().


Note that normally its best to use context.region.tag_redraw() (which would redraw only the panel), however its not working in this case because this region isn't active when the pop-up executes.

You could store the region before executing the operator, but this is probably more hassle then its worth.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.