Skip to content
Snippets Groups Projects
Commit 76691d35 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

[ #11569 ] Fix filter

parent b8eb10ca
No related branches found
No related tags found
No related merge requests found
......@@ -60,18 +60,6 @@ CallTreeItemDelegate(CallView* widget)
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const {
QSize sh = QStyledItemDelegate::sizeHint(option, index);
/*if (!index.parent().isValid()) {
sh.rheight() += 2 * m_categoryDrawer.leftMargin();
} else {
sh.rheight() += m_categoryDrawer.leftMargin();
}
if (index.column() == 0) {
sh.rwidth() += m_categoryDrawer.leftMargin();
} else if (index.column() == 1) {
sh.rwidth() = 150;
} else {
sh.rwidth() += m_categoryDrawer.leftMargin();
}*/
QTreeWidgetItem* item = (m_tree)->itemFromIndex(index);
if (item) {
CallTreeItem* widget = (CallTreeItem*)m_tree->itemWidget(item,0);
......
......@@ -281,7 +281,13 @@ void ContactDock::filter(const QString& text)
}
//m_pContactView->expandAll();
for (int i=0;i< m_pContactView->topLevelItemCount();i++) {
bool visible = false;
QTreeWidgetItem* item = m_pContactView->topLevelItem(i);
int count = item->childCount();
for (int j=0;j<count;j++) visible |= !item->child(j)->isHidden();
m_pContactView->topLevelItem(i)->setHidden(!visible);
}
} //filter
void ContactDock::reloadHistoryConst()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment