Avoid spurious checkcombobox toggle where indexes don't match
When clicking on a KCheckComboBox
that has an item already selected,
QComboBox
will fire activated (via _q_editingFinished
). When this
popup is opening for the first time the currentIndex
of the combo
box is correct but the view's current index is still row 0. This
leads to spuriously toggling the first item in the list.
Since this activation from QComboBox
happens programatically, care
must also be taken not to process this event for a disabled item.
I found another example of this apart from the weekly recurrence.
- In KOrganizer go to Settings > Configure KOrganizer > Time and Date
- In "Holidays" dropdown, select something that's not the top item, e.g. "Argentina (Spanish)"
- "OK" to save settings
- Quit KOrganizer
- Restart KOrganizer and return to the same settings
- Click on the Holidays dropdown and see that the top item "Algeria (Arabic)" has suddenly become selected in addition to the earlier selection.
BUG: 347045
Edited by Thomas Karpiniec