Skip to content

Commit

Permalink
Fire DOCUMENT_CHANGE_COMPLETE on replacing missing pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
bhennion committed May 7, 2024
1 parent 74e380b commit b645168
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/control/PageBackgroundChangeController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,7 @@ void PageBackgroundChangeController::changePdfPagesBackground(const fs::path& fi
}
this->control->getWindow()->getXournal()->recreatePdfCache();

for (size_t p = 0; p < doc->getPageCount(); p++) {
if (doc->getPage(p)->getBackgroundType().format == PageTypeFormat::Pdf) {
this->control->firePageSizeChanged(p);
}
}
this->control->fireDocumentChanged(DOCUMENT_CHANGE_COMPLETE);

auto undoAction = std::make_unique<MissingPdfUndoAction>(oldFilepath, oldAttachPdf);
this->control->getUndoRedoHandler()->addUndoAction(std::move(undoAction));
Expand Down

0 comments on commit b645168

Please sign in to comment.