Commit 1aae63eb authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

annots: Add popup annots without a markup annot associated to the list of annots

For consistency with Annots::createAnnot().
parent 05ef3f9f
......@@ -697,7 +697,7 @@ public:
~AnnotPopup();
Object *getParent(Object *obj) { return parent.fetch (xref, obj); }
Object *getParentNF(Object *obj) { return &parent; }
Object *getParentNF() { return &parent; }
void setParent(Object *parentA);
void setParent(Annot *parentA);
GBool getOpen() const { return open; }
......
......@@ -442,7 +442,11 @@ void Page::addAnnot(Annot *annot) {
obj1.free();
}
if (annot->getType() != Annot::typePopup) {
// Popup annots are already handled by markup annots,
// so add to the list only Popup annots without a
// markup annotation associated.
if (annot->getType() != Annot::typePopup ||
static_cast<AnnotPopup*>(annot)->getParentNF()->isNull()) {
annots->appendAnnot(annot);
}
annot->setPage(num, gTrue);
......
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