There are usecases where items should not be unselectable by the user.
For example in the tab_bar. With this commit, a tab bar user cannot
unselect a item by hand anymore.
Depends on D10305
I had not noticed that tab_bars could be left with no page selected. But I thought we would be fixing this at the Single_Selectable level, by having a mechanism to force one element to be always selected. Maybe a new Efl.Ui.Select_Mode?
This is not solvable alone at the single_selection layer, as we would need something in the theme to ignore the clickable event of this beeing unpressed. We cannot just quickly change the selection state of the item again, as this would at least render one frame wrong.
We can add something ontop of single_selection that uses this property...
Builds, passes tests and fixes the issue as advertised. Code looks good to me.
Controls whether items can be deselected by the user by clicking over the currently selected item. Keep in mind that this leads to containers with no item selected, which is not always desirable (for example, for tabs).
$true if clicking on a selected item results in the item being deselected.
I made the same mistake, but, no, they are different things :)
select_always allows you to select again and again the same object (even if it is already selected), so the application would receive the selected events multiple times.
This patch is about not allowing empty selections. Related, but not the same thing.
BTW, we already had this confusion in T8057#140379, in point number 5.