ui: Don't apply stylesheet to search view every time autocompletions are set
This commit is contained in:
@@ -21,7 +21,9 @@ QtAutocompletionModel::~QtAutocompletionModel()
|
|||||||
|
|
||||||
void QtAutocompletionModel::setMatchList(const std::vector<SearchMatch>& matchList)
|
void QtAutocompletionModel::setMatchList(const std::vector<SearchMatch>& matchList)
|
||||||
{
|
{
|
||||||
|
size_t rowCount = std::max(m_matchList.size(), matchList.size());
|
||||||
m_matchList = matchList;
|
m_matchList = matchList;
|
||||||
|
emit dataChanged(index(0, 0), index(rowCount - 1, 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
int QtAutocompletionModel::rowCount(const QModelIndex &parent) const
|
int QtAutocompletionModel::rowCount(const QModelIndex &parent) const
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ void QtSearchView::setAutocompletionList(const std::vector<SearchMatch>& autocom
|
|||||||
m_onQtThread([=]()
|
m_onQtThread([=]()
|
||||||
{
|
{
|
||||||
m_widget->setAutocompletionList(autocompletionList);
|
m_widget->setAutocompletionList(autocompletionList);
|
||||||
setStyleSheet();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user