Attempt to fix #12226 for good

This commit is contained in:
Juergen Spitzmueller 2021-11-01 08:30:41 +01:00
parent f3d5a95bb2
commit 4888414f27
2 changed files with 4 additions and 4 deletions

View File

@ -532,11 +532,11 @@ void TocWidget::filterContents()
activeFilterCO->currentIndex() != 1;
int size = indices.size();
QString const matchstring = filter_ ? filter_->text() : QString();
for (int i = 0; i < size; i++) {
QModelIndex index = indices[i];
bool matches = filter_ &&
index.data().toString().contains(
filter_->text(), Qt::CaseInsensitive);
bool matches = index.data().toString().contains(
matchstring, Qt::CaseInsensitive);
TocItem const & item =
gui_view_.tocModels().currentItem(current_type_, index);
matches &= (show_active && item.isOutput()) || (show_inactive && !item.isOutput());

View File

@ -120,7 +120,7 @@ private:
// Timer for scheduling expensive update operations
QTimer * timer_;
/// Filter bar
FancyLineEdit * filter_;
FancyLineEdit * filter_ = nullptr;
};
} // namespace frontend