mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-01 05:33:33 +00:00
AnnotationModel: don't emit layoutChanged from inside reset
rebuildTree's only caller is notifySetup() which does a reset, don't emit layoutChanged() between beginResetModel and endResetModel. Caught by QAbstractItemModelTester (after instanciating one in the AnnotationModel constructor to debug something else)
This commit is contained in:
parent
8733e544e3
commit
2592879c4a
|
@ -256,7 +256,6 @@ void AnnotationModelPrivate::rebuildTree(const QVector<Okular::Page *> &pages)
|
|||
return;
|
||||
}
|
||||
|
||||
Q_EMIT q->layoutAboutToBeChanged();
|
||||
for (int i = 0; i < pages.count(); ++i) {
|
||||
const QList<Okular::Annotation *> annots = filterOutWidgetAnnotations(pages.at(i)->annotations());
|
||||
if (annots.isEmpty()) {
|
||||
|
@ -268,7 +267,6 @@ void AnnotationModelPrivate::rebuildTree(const QVector<Okular::Page *> &pages)
|
|||
new AnnItem(annItem, annot);
|
||||
}
|
||||
}
|
||||
Q_EMIT q->layoutChanged();
|
||||
}
|
||||
|
||||
AnnItem *AnnotationModelPrivate::findItem(int page, int *index) const
|
||||
|
|
Loading…
Reference in a new issue