mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-30 10:55:37 -04:00
[netinstall] Don't update selection state for items with no children
The special setup for nicely-named groups which have a single hidden subgroup containing the actual packages, has the problem that there is a non-empty subgroups item, but this results in zero actual children: then the number of selected and partly selected children is also zero in updateSelected() and therefore the item ends up unselected. Special-case this to avoid unnecessarily unselecting the item. Reported by Vitor L.
This commit is contained in:
parent
bf50f8724d
commit
0cb6c89876
1 changed files with 7 additions and 2 deletions
|
@ -267,8 +267,13 @@ PackageModel::setupModelData( const QVariantList& groupList, PackageTreeItem* pa
|
|||
setupModelData( subgroups, item );
|
||||
// The children might be checked while the parent isn't (yet).
|
||||
// Children are added to their parent (below) without affecting
|
||||
// the checked-state -- do it manually.
|
||||
item->updateSelected();
|
||||
// the checked-state -- do it manually. Items with subgroups
|
||||
// but no children have only hidden children -- those get
|
||||
// handled specially.
|
||||
if ( item->childCount() > 0 )
|
||||
{
|
||||
item->updateSelected();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue