| 84 | } |
| 85 | |
| 86 | bool 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 | |
| 102 | RemoveAnnotationCommand::RemoveAnnotationCommand(Okular::DocumentPrivate *doc, Okular::Annotation *annotation, int pageNumber) |
| 103 | : m_docPriv(doc) |
no test coverage detected