Bug report #14325

Order-By-Clause accumulates default sub-clauses

Added by Sebastian Dietrich about 8 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:Sebastian Dietrich
Category:Symbology
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:22313

Description

If a layer has only one attribute, the default sub-clause for the Control feature rendering order order-by-clause is added everytime
  • the Define order dialog is opened
  • the last sub-clause in that dialog loses focus
Reproduce:
  • Create a memory layer with a single attribute Attr
  • Open the Vector layer properties dialog
  • Open the Define order dialog
  • -> Note the default clause Attr ASC NULLS LAST is added automatically.
  • Click to set the focus to the text-edit containing Attr
  • Click anywhere else to take the focus away from it
  • -> The default clause is added again.
  • Close the dialog
  • Re-open the dialog
  • -> The default clause is added again.

Associated revisions

Revision 9dca6da0
Added by Nyall Dawson about 6 years ago

Don't silently discard requests to set QgsFieldExpressionWidget
to an empty expression

This causes issues in lots of places - e.g. a field constraint
is always set to the first field in a layer, and cannot be
removed.

I've looked at all calls to setField and without exception
they should accept that setting the field to an empty string
results in an empty expression.

Fixes #14325

History

#1 Updated by Sebastian Dietrich about 8 years ago

  • % Done changed from 0 to 100
  • Pull Request or Patch supplied changed from No to Yes
  • Assignee set to Sebastian Dietrich
  • Status changed from Open to In Progress

See PR 2810 for a solution.

#2 Updated by Giovanni Manghi almost 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#3 Updated by Nyall Dawson about 6 years ago

  • Status changed from In Progress to Closed

#4 Updated by Giovanni Manghi about 6 years ago

  • Resolution set to fixed/implemented
  • Description updated (diff)

Also available in: Atom PDF