From 63d81e751db15630cdbff019660ce5e6c50209b8 Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Sun, 23 Feb 2025 19:49:04 +0100 Subject: [PATCH] =?UTF-8?q?Update=20kreslen=C3=AD=20anotac=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pdf4QtLibCore/sources/pdfannotation.cpp | 15 +-------------- Pdf4QtLibWidgets/sources/pdfdrawspacecontroller.h | 2 +- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Pdf4QtLibCore/sources/pdfannotation.cpp b/Pdf4QtLibCore/sources/pdfannotation.cpp index db3b507..26e9ce6 100644 --- a/Pdf4QtLibCore/sources/pdfannotation.cpp +++ b/Pdf4QtLibCore/sources/pdfannotation.cpp @@ -1454,7 +1454,6 @@ void PDFAnnotationManager::drawPage(QPainter* painter, const PDFCMSPointer cms = m_cmsManager->getCurrentCMS(); m_fontCache->setCacheShrinkEnabled(&fontCacheLock, false); - const PageAnnotation* annotationDrawnByEditor = nullptr; for (const PageAnnotation& annotation : annotations.annotations) { // If annotation draw is not enabled, then skip it @@ -1463,19 +1462,7 @@ void PDFAnnotationManager::drawPage(QPainter* painter, continue; } - if (isAnnotationDrawnByEditor(annotation)) - { - Q_ASSERT(!annotationDrawnByEditor); - annotationDrawnByEditor = &annotation; - continue; - } - - drawAnnotation(annotation, pagePointToDevicePointMatrix, page, cms.data(), false, errors, painter); - } - - if (annotationDrawnByEditor) - { - drawAnnotation(*annotationDrawnByEditor, pagePointToDevicePointMatrix, page, cms.data(), true, errors, painter); + drawAnnotation(annotation, pagePointToDevicePointMatrix, page, cms.data(), isAnnotationDrawnByEditor(annotation), errors, painter); } m_fontCache->setCacheShrinkEnabled(&fontCacheLock, true); diff --git a/Pdf4QtLibWidgets/sources/pdfdrawspacecontroller.h b/Pdf4QtLibWidgets/sources/pdfdrawspacecontroller.h index bf245e0..ca10d8f 100644 --- a/Pdf4QtLibWidgets/sources/pdfdrawspacecontroller.h +++ b/Pdf4QtLibWidgets/sources/pdfdrawspacecontroller.h @@ -382,7 +382,7 @@ signals: void pageLayoutChanged(); void renderingError(pdf::PDFInteger pageIndex, const QList& errors); void repaintNeeded(); - void pageImageChanged(bool all, const std::vector& pages); + void pageImageChanged(bool all, const std::vector& pages); void textLayoutChanged(); private: