Closed davidlatwe closed 4 years ago
Nice - thanks for looking into it so quickly.
This could be a tricky one though. What happens on:
pyblish_qml.show(targets=["custom"])
# ... keep window open
pyblish_qml.show(targets=None)
Would we want the latter to resort to the default of using [default] + api.registered_targets()
like on the initial run or to have it persist whatever it had.
It seems most logical if it behaved the same to a complete refresh (close and run) with the same arguments. As such, should it on targets=None
be targets = [default] + api.registered_targets()
as is done on __init__
. I'd expect that to be the most logical behavior. Does it currently behave like that?
Does it currently behave like that?
No ! And I think you are right, that would be what I'll expected, too.
Does it currently behave like that?
And now it does.
Previously, targets
provided from pyblish_qml.api.show
will remain the same if next show
call has no targets
given. After 3fdccb5, it will fallback to [default] + pyblish.api.registered_targets()
.
Thanks ! Will merge this later today :D
Arrr sorry, forgot to bump the version, will push to master. ðŸ˜
This was reported in Gitter 👉 February 3, 2020 4:54 PM from @BigRoy .
It was a bug after #347, it was trying to solve #335 which was assigning and changing targets via
pyblish_qml.api.show
. But the solution did not pay attention to the case that is using targets frompyblish.api.registered_targets
, hence we got the bug.Reproducible
What's changed
targets
is providedtargets
changes toNone
instead of mutablelist