<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Annotations of /Subtype /Popup are not added to /Annots array of a page"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89136#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Annotations of /Subtype /Popup are not added to /Annots array of a page"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89136">bug 89136</a>
from <span class="vcard"><a class="email" href="mailto:philipp.reinkemeier@offis.de" title="philipp.reinkemeier@offis.de">philipp.reinkemeier@offis.de</a>
</span></b>
<pre>(In reply to philipp.reinkemeier from <a href="show_bug.cgi?id=89136#c10">comment #10</a>)
<span class="quote">> (In reply to Carlos Garcia Campos from <a href="show_bug.cgi?id=89136#c9">comment #9</a>)
> > @@ +449,5 @@
> > > + if (annot_markup) {
> > > + AnnotPopup *annot_popup = annot_markup->getPopup();
> > > + if (annot_popup) {
> > > + this->addAnnot(annot_popup);
> > > + }
> >
> > I don't think we need this. If a new markup annotation is created with a
> > popup, setPopup will be called at some point, so we don't need to add the
> > popup when the markup annot itself is added.
>
> Yes, setPopup will be called at some point. But you do not know whether it
> will be called before or after Page::addAnnot(). So removing this would
> require to first call Page::addAnnot(ma) for a markup annotation "ma" and
> then call ma->setPopup(). Doing it the other way round would then result in
> the same problem as before: The popup annotation does not appear in the
> /Annots array. Btw.: IIRC the last call sequence (setting popup, then adding
> to page) that would break if the snippet above is removed, is the one that
> is implemented in evince.</span >
Btw.: I just tested what happens when i removed that code and create a Text
annotation in evince. Indeed evince first calls AnnotMarkup::setPopup() and
then Page::addAnnot(), meaning the resulting pdf is broken like without the
patch.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>