Open MichaelsJP opened 2 years ago
Hey, great find :) What's your expectation of what should happen if you click the "refresh"-button next to the providers? Should it keep the selection or revert back to the "default"?
IMO the "refresh" button is only pushed when a new provider was added. So I would guess we can leave it as is.
If we want to make it dynamic and not have to come back to the provider settings all the time, we need to do this when the dropdown value of the combobox is changed. As the provider can also be set from the processing scripts, we need to have a similar thing for the Enums there.
This might work for the combo box. Probably possible in a similar way for the Enums in the processing script UIs.
We could then store the active provider in the config and load it from there to also persist the choice for multiple QGIS sessions.
While we could set any provider as "active" when the value of the combo box changes, I don't think this is possible for the dropdown of the processing scripts. This could only happen when the processing algorithm is executed, so it would kinda go against this idea…
Further discussion revealed, that this could also happen on closing the window, so that would mimic setting it whenever the value in the dropdown changes (unless someone has both windows open at the same time…)
Here's what I did
Add a custom provider. Select it. Close the Plugin and reopen it.
Here's what I got
The selection always switches back to the default one.
Here's what I was expecting
The last choice should be remembered.
Here's what I think could be improved