FS#1862(Groups of) Radio Button does not remember its state.
- Type
- Bug
- Status
- Closed
- Resolution
- Not a bug
- Category
- ECMAScript
- Severity
- Low
- Priority
- Low
- Reported version
- 3.22.0
- Operating system
- All
- Reported
- 2019-03-22 by JieFK
- Closed
- 2019-03-22 by andrew
Also, the way the state of radioButtons is saved on Qcad3.conf is rather confusing.
Exemple :
Two radioButtons _cr_i and _cr_x are in the same QWidget.
- check _cr_i
- validate the form with OK
- reopen the form, check _cr_x
- validate the form with OK
the config file reads
[_myPlenum2]
VisibleInMenu=true
...
_cr_i=_cr_i
_cr_x=_cr_x
...
On next form run, even if I select _cr_i, the radiobutton QWidget always takes the value of _cr_x.
Comments (2)
If I can suggest a bug fix, I would save the state as this :
Radio buttons must be grouped in the same QGroupBox (visibe) or QButtonGroup (invisible).
The values are then stored as:
[Name of QGroupBox]=[Name of checked QRadioButton]
or
[Name of QButtonGroup]=[Name of checked QRadioButton]
See MirrorDialog for an example:
https://github.com/qcad/qcad/blob/master/scripts/Modify/Mirror/MirrorDialog.ui