Qt/CheatManager: Fix checking groups not updating child nodes

pull/1289/head
Connor McLaughlin 4 years ago
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)
{
// 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…
Cancel
Save