Commit 9d789bbd authored by Kåre Särs's avatar Kåre Särs Committed by Christoph Cullmann
Browse files

Do not hide the tree root item on empty results

parent a6a457db
...@@ -455,7 +455,7 @@ static QString nbsFormated(int number, int width) ...@@ -455,7 +455,7 @@ static QString nbsFormated(int number, int width)
QString MatchModel::infoHtmlString() const QString MatchModel::infoHtmlString() const
{ {
if (m_matchFiles.isEmpty() && m_searchState == SearchDone) { if (m_matchFiles.isEmpty() && m_searchState == SearchDone && m_lastMatchUrl.isEmpty()) {
return QString(); return QString();
} }
...@@ -975,7 +975,9 @@ Qt::ItemFlags MatchModel::flags(const QModelIndex &index) const ...@@ -975,7 +975,9 @@ Qt::ItemFlags MatchModel::flags(const QModelIndex &index) const
int MatchModel::rowCount(const QModelIndex &parent) const int MatchModel::rowCount(const QModelIndex &parent) const
{ {
if (!parent.isValid()) { if (!parent.isValid()) {
return (m_matchFiles.isEmpty() && m_searchState == SearchDone) ? 0 : 1; return (m_matchFiles.isEmpty() &&
m_searchState == SearchDone &&
m_lastMatchUrl.isEmpty()) ? 0 : 1;
} }
if (parent.internalId() == InfoItemId) { if (parent.internalId() == InfoItemId) {
......
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