You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea was to use the already defined filter first, if it works. I often have the situation where an unfiltered query gives an invalid layer because of duplicate keys, different geometry types or something else.
The usual trick is to make it valid by adding a LIMIT 0, then defining the filter and removing the LIMIT 0 again. At the moment I have to do this in the project/layer-definition XML file.
(Since PR #2458 any empty query can be made a valid layer, too.)
In any case the layer is not deleted, although I didn't try what happens in this one. I'll check it this evening, AFAICS there's no ownership sip annotation for QgsQueryBuilder ctor.
If dlg has neither parent nor Qt::DeleteOnClose set, probably it won't be deleted as well.
I was wrong... I thought dlg is a class member... it has no parent and it's a local var, so dlg is deleted when it goes out of scope. And the same should happen for layer. BTW, I'll try this evening and let you know.
0 commit comments