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
If the query text box is empty when clicking the OK button, the empty string is not used and evaluated. This means that if there was already a query existing, it is kept, instead of the expected result of clearing it. Validating an empty query should be equivalent to clearing the query.
This is due to a test made in QgsQueryBuilder::accept(), skipping the validation for an empty query. I do not see the point of this test, so I propose simply to remove it. If it is useful to avoid validation of an empty query for another reason, we should still validate it with mLayer->setSubsetString( "" );
Author Name: Leyan Ouyang (Leyan Ouyang)
Original Redmine Issue: 5641
Affected QGIS version: master
If the query text box is empty when clicking the OK button, the empty string is not used and evaluated. This means that if there was already a query existing, it is kept, instead of the expected result of clearing it. Validating an empty query should be equivalent to clearing the query.
This is due to a test made in QgsQueryBuilder::accept(), skipping the validation for an empty query. I do not see the point of this test, so I propose simply to remove it. If it is useful to avoid validation of an empty query for another reason, we should still validate it with mLayer->setSubsetString( "" );
Patch attached.
The text was updated successfully, but these errors were encountered: