mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
correctly set the External flag for annotations loaded from documents
svn path=/trunk/KDE/kdegraphics/okular/; revision=746264
This commit is contained in:
parent
2eb9a53642
commit
870980da75
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue