Commit 870980da authored by Pino Toscano's avatar Pino Toscano

correctly set the External flag for annotations loaded from documents

svn path=/trunk/KDE/kdegraphics/okular/; revision=746264
parent 2eb9a536
......@@ -93,6 +93,8 @@ void TextDocumentGeneratorPrivate::addAnnotation( Annotation *annotation, int cu
if ( !annotation )
return;
annotation->setFlags( annotation->flags() | Okular::Annotation::External );
AnnotationPosition position;
position.annotation = annotation;
position.startPosition = cursorBegin;
......
......@@ -448,6 +448,8 @@ Okular::Annotation* DjVuGenerator::convertKDjVuAnnotation( int w, int h, KDjVu::
uid.chop( 1 );
uid.remove( QLatin1Char( '-' ) );
newann->setUniqueName( uid );
// is external
newann->setFlags( newann->flags() | Okular::Annotation::External );
}
return newann;
}
......
......@@ -1261,6 +1261,8 @@ void PDFGenerator::addAnnotations( Poppler::Page * popplerPage, Okular::Page * p
QString contents = newann->contents();
contents.replace( QLatin1Char( '\r' ), QLatin1Char( '\n' ) );
newann->setContents( contents );
// explicitely mark as external
newann->setFlags( newann->flags() | Okular::Annotation::External );
page->addAnnotation(newann);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment