MCPcopy Create free account
hub / github.com/KDE/okular / refreshInternalPageReferences

Method refreshInternalPageReferences

core/documentcommands.cpp:86–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86bool AddAnnotationCommand::refreshInternalPageReferences(const QList<Okular::Page *> &newPagesVector)
87{
88 if (m_done) {
89 // We don't always update m_annotation because even if the annotation has been added to the document
90 // it can have been removed later so the annotation pointer is stored inside a following RemoveAnnotationCommand
91 // and thus doesn't need updating because it didn't change
92 // because of the document reload
93 auto a = newPagesVector[m_pageNumber]->annotation(m_annotation->uniqueName());
94 if (a) {
95 m_annotation = a;
96 }
97 }
98
99 return true;
100}
101
102RemoveAnnotationCommand::RemoveAnnotationCommand(Okular::DocumentPrivate *doc, Okular::Annotation *annotation, int pageNumber)
103 : m_docPriv(doc)

Callers 1

swapBackingFileMethod · 0.80

Calls 4

uniqueNameMethod · 0.80
annotationMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected