forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user