Commit 055f2db7 authored by Albert Astals Cid's avatar Albert Astals Cid Committed by Albert Astals Cid

Set back the autogenerated annotation unique name on saving

The the original unique name was empty. Otherwise we can't find the annotation after save/reload because the annotation name is still empty and a new random id is assigned
parent 210a6ced
......@@ -1717,6 +1717,18 @@ bool PDFGenerator::save( const QString &fileName, SaveOptions options, QString *
pdfConv->setPDFOptions( pdfConv->pdfOptions() | Poppler::PDFConverter::WithChanges );
QMutexLocker locker( userMutex() );
QHashIterator<Okular::Annotation*, Poppler::Annotation*> it( annotationsHash );
while ( it.hasNext() )
{
it.next();
if ( it.value()->uniqueName().isEmpty() )
{
it.value()->setUniqueName( it.key()->uniqueName() );
}
}
bool success = pdfConv->convert();
if (!success)
{
......
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