Fix crash after 24926b2e23.

The matched element may not have a parent. I guess the old version of
setExpanded too care of that. Now we have to do so.
This commit is contained in:
Richard Kimberly Heck 2020-03-28 15:23:13 -04:00
parent c5c1683024
commit 104fdcc9be

View File

@ -3266,6 +3266,7 @@ void PrefShortcuts::on_searchLE_textEdited()
for (int i = 0; i < matched.size(); ++i)
if (!isAlwaysHidden(*matched[i])) {
matched[i]->setHidden(false);
if (matched[i]->parent())
matched[i]->parent()->setExpanded(true);
}
}