Bug report #18076

Checkbox options in drag and drop designer disappears when default value is not blank in QGIS 2.99

Added by Nathan Saylor almost 7 years ago. Updated over 6 years ago.

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

Description

I came across this trying to trigger checkbox states based on other checkbox states with case->when default values to behave similar to radio buttons. No luck there, but came across this.

Reproduction steps
  1. Start new project
  2. Add new scratch layer, no geometry
  3. Add an integer field and save
  4. In Attributes Form, select the field. Change Widget Type to Checkbox. Set checked state to 1, unchecked to 0. Apply. OK.
  5. Re-open properties. Select the field. In default values, enter 1 (to default to checked state). Apply. OK.
  6. Re-open properties. Select the field. CHECKED STATE OPTIONS ARE GONE!
  7. Clear the default value. Apply. OK.
  8. Re-open properties. Select the field. Checked state options return, but empty.
  9. Could be there's a reasonable explanation for this?

Thanks!
BTW, originally added this to #18075 but I'm not sure that is watched.

Associated revisions

Revision 0eda7766
Added by Nyall Dawson almost 7 years ago

Fix loss of checkbox widget settings when a default expression is set

Fixes #18076

History

#1 Updated by Nyall Dawson almost 7 years ago

  • Regression? changed from No to Yes

#3 Updated by Nyall Dawson almost 7 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#4 Updated by Jürgen Fischer almost 7 years ago

  • Description updated (diff)

#5 Updated by Giovanni Manghi over 6 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF