mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-19 16:01:41 +00:00
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
This commit is contained in:
parent
210a6ced5a
commit
055f2db76d
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue