Commit b295e829 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed disabling tabs in options dialog when category matches search

When the category title matches with the search keyword, we shouldn't
disable any of the tabs in this category. For example the only page in
the Locator category was disabled, because the page itself did not have
'Locator' as keyword.

Reviewed-by: con
parent acea722d
......@@ -382,6 +382,7 @@ void SettingsDialog::updateEnabledTabs(Category *category, const QString &search
for (int i = 0; i < category->pages.size(); ++i) {
const IOptionsPage *page = category->pages.at(i);
const bool enabled = searchText.isEmpty()
|| page->category().contains(searchText, Qt::CaseInsensitive)
|| page->displayName().contains(searchText, Qt::CaseInsensitive)
|| page->matches(searchText);
category->tabWidget->setTabEnabled(i, enabled);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment