diff --git a/core/annotations.h b/core/annotations.h index 4ab45f65b..b9358ecf8 100644 --- a/core/annotations.h +++ b/core/annotations.h @@ -28,6 +28,7 @@ class AnnotationObjectRect; class AnnotationPrivate; class Document; class Page; +class PagePrivate; class TextAnnotationPrivate; class LineAnnotationPrivate; class GeomAnnotationPrivate; @@ -84,6 +85,7 @@ class OKULAR_EXPORT Annotation friend class AnnotationObjectRect; friend class Document; friend class Page; + friend class PagePrivate; public: /** diff --git a/core/page.cpp b/core/page.cpp index 1dec97d11..c2e5a53a4 100644 --- a/core/page.cpp +++ b/core/page.cpp @@ -677,6 +677,7 @@ void PagePrivate::restoreLocalContents( const QDomNode & pageNode ) // append annotation to the list or show warning if ( annotation ) { + annotation->d_ptr->m_page = this; m_page->m_annotations.append( annotation ); m_page->m_rects.append( new AnnotationObjectRect( annotation ) ); int pos = annotation->uniqueName().lastIndexOf("-");