Commit 77dd698d authored by Edric Milaret's avatar Edric Milaret

history: fix expand being done too early

Refs #76415

Change-Id: I0912db7f2899f9b4f4a100bec149f075d20c0e6a
parent 013073c5
......@@ -92,9 +92,13 @@ CallWidget::CallWidget(QWidget *parent) :
ui->historyList->setHeaderHidden(true);
historyDelegate_ = new HistoryDelegate();
ui->historyList->setItemDelegate(historyDelegate_);
auto idx = CategorizedHistoryModel::SortedProxy::instance()->model()->index(0,0);
if (idx.isValid())
ui->historyList->setExpanded(idx, true);
connect(CategorizedHistoryModel::SortedProxy::instance()->model(), &QSortFilterProxyModel::layoutChanged, [=]() {
auto idx = CategorizedHistoryModel::SortedProxy::instance()->model()->index(0,0);
if (idx.isValid())
ui->historyList->setExpanded(idx, true);
});
ui->sortComboBox->setModel(CategorizedHistoryModel::SortedProxy::instance()->categoryModel());
......
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