mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Attempt to fix #12226 for good
This commit is contained in:
parent
f3d5a95bb2
commit
4888414f27
@ -532,11 +532,11 @@ void TocWidget::filterContents()
|
|||||||
activeFilterCO->currentIndex() != 1;
|
activeFilterCO->currentIndex() != 1;
|
||||||
|
|
||||||
int size = indices.size();
|
int size = indices.size();
|
||||||
|
QString const matchstring = filter_ ? filter_->text() : QString();
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
QModelIndex index = indices[i];
|
QModelIndex index = indices[i];
|
||||||
bool matches = filter_ &&
|
bool matches = index.data().toString().contains(
|
||||||
index.data().toString().contains(
|
matchstring, Qt::CaseInsensitive);
|
||||||
filter_->text(), Qt::CaseInsensitive);
|
|
||||||
TocItem const & item =
|
TocItem const & item =
|
||||||
gui_view_.tocModels().currentItem(current_type_, index);
|
gui_view_.tocModels().currentItem(current_type_, index);
|
||||||
matches &= (show_active && item.isOutput()) || (show_inactive && !item.isOutput());
|
matches &= (show_active && item.isOutput()) || (show_inactive && !item.isOutput());
|
||||||
|
@ -120,7 +120,7 @@ private:
|
|||||||
// Timer for scheduling expensive update operations
|
// Timer for scheduling expensive update operations
|
||||||
QTimer * timer_;
|
QTimer * timer_;
|
||||||
/// Filter bar
|
/// Filter bar
|
||||||
FancyLineEdit * filter_;
|
FancyLineEdit * filter_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace frontend
|
} // namespace frontend
|
||||||
|
Loading…
Reference in New Issue
Block a user