Qt/CheatManager: Fix checking groups not updating child nodes
This commit is contained in:
parent
972872a0c8
commit
9384f3a8e9
|
@ -382,11 +382,20 @@ void CheatManagerDialog::cheatListItemChanged(QTreeWidgetItem* item, int column)
|
|||
if (!item || column != 0)
|
||||
return;
|
||||
|
||||
CheatList* list = getCheatList();
|
||||
|
||||
const int index = getCheatIndexFromItem(item);
|
||||
if (index < 0)
|
||||
return;
|
||||
{
|
||||
// we're probably a parent/group node
|
||||
const int child_count = item->childCount();
|
||||
const Qt::CheckState cs = item->checkState(0);
|
||||
for (int i = 0; i < child_count; i++)
|
||||
item->child(i)->setCheckState(0, cs);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
CheatList* list = getCheatList();
|
||||
if (static_cast<u32>(index) >= list->GetCodeCount())
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue