Ensure category to be searched is expanded.

This commit is contained in:
craig.p.drummond
2013-10-09 18:53:53 +00:00
parent 9fa96846fb
commit cbe7502905
2 changed files with 2 additions and 2 deletions

View File

@@ -334,7 +334,7 @@ void OnlineServicesPage::controlSearch(bool on)
QModelIndex filterIndex=srv ? OnlineServicesModel::self()->serviceIndex(srv) : QModelIndex();
proxy.updateWithFilter(QString(), QString(), srv);
if (filterIndex.isValid()) {
view->showIndex(proxy.mapFromSource(filterIndex), true);
view->expand(proxy.mapFromSource(filterIndex), true);
}
} else {
OnlineService *srv=OnlineServicesModel::self()->service(prevSearchService);

View File

@@ -549,7 +549,7 @@ void StreamsPage::controlSearch(bool on)
proxy->updateWithFilter(QString(), QString(), cat);
QModelIndex filterIndex=cat ? StreamsModel::self()->categoryIndex(cat) : QModelIndex();
if (filterIndex.isValid()) {
view->showIndex(proxy->mapFromSource(filterIndex), true);
view->expand(proxy->mapFromSource(filterIndex), true);
}
// We need to call focusSearch via 'invokeMethod' as we need this to occur at the nex event-loop iteration.
// This is due to the fact that we have 2 views - search (for TuneIn/ShoutCasy) and standard. Our focusSearch()