mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Update kreslení anotací
This commit is contained in:
@ -1454,7 +1454,6 @@ void PDFAnnotationManager::drawPage(QPainter* painter,
|
|||||||
const PDFCMSPointer cms = m_cmsManager->getCurrentCMS();
|
const PDFCMSPointer cms = m_cmsManager->getCurrentCMS();
|
||||||
m_fontCache->setCacheShrinkEnabled(&fontCacheLock, false);
|
m_fontCache->setCacheShrinkEnabled(&fontCacheLock, false);
|
||||||
|
|
||||||
const PageAnnotation* annotationDrawnByEditor = nullptr;
|
|
||||||
for (const PageAnnotation& annotation : annotations.annotations)
|
for (const PageAnnotation& annotation : annotations.annotations)
|
||||||
{
|
{
|
||||||
// If annotation draw is not enabled, then skip it
|
// If annotation draw is not enabled, then skip it
|
||||||
@ -1463,19 +1462,7 @@ void PDFAnnotationManager::drawPage(QPainter* painter,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAnnotationDrawnByEditor(annotation))
|
drawAnnotation(annotation, pagePointToDevicePointMatrix, page, cms.data(), isAnnotationDrawnByEditor(annotation), errors, painter);
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fontCache->setCacheShrinkEnabled(&fontCacheLock, true);
|
m_fontCache->setCacheShrinkEnabled(&fontCacheLock, true);
|
||||||
|
@ -382,7 +382,7 @@ signals:
|
|||||||
void pageLayoutChanged();
|
void pageLayoutChanged();
|
||||||
void renderingError(pdf::PDFInteger pageIndex, const QList<pdf::PDFRenderError>& errors);
|
void renderingError(pdf::PDFInteger pageIndex, const QList<pdf::PDFRenderError>& errors);
|
||||||
void repaintNeeded();
|
void repaintNeeded();
|
||||||
void pageImageChanged(bool all, const std::vector<PDFInteger>& pages);
|
void pageImageChanged(bool all, const std::vector<pdf::PDFInteger>& pages);
|
||||||
void textLayoutChanged();
|
void textLayoutChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user