Skip to content

Commit

Permalink
Issue #190: PageMaster crash + black bubbles instead of bubbles with …
Browse files Browse the repository at this point in the history
…correct color
  • Loading branch information
JakubMelka committed Jun 28, 2024
1 parent 3728af3 commit b6fda40
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Pdf4QtLibCore/sources/pdfdocumentbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,19 @@ void PDFDocumentBuilder::mergeNames(PDFObjectReference a, PDFObjectReference b)
const PDFDictionary* aDict = getDictionaryFromObject(aObject);
const PDFDictionary* bDict = getDictionaryFromObject(bObject);

PDFDictionary aDictDummy;
PDFDictionary bDictDummy;

if (!aDict)
{
aDict = &aDictDummy;
}

if (!bDict)
{
bDict = &bDictDummy;
}

// Store keys
std::set<QByteArray> keys;
for (size_t i = 0; i < aDict->getCount(); ++i)
Expand Down
3 changes: 3 additions & 0 deletions Pdf4QtLibCore/sources/pdftransparencyrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,9 @@ bool PDFTransparencyRenderer::isContentKindSuppressed(ContentKind kind) const
}
break;

case ContentKind::Forms:
return false;

default:
Q_ASSERT(false);
break;
Expand Down
3 changes: 1 addition & 2 deletions Pdf4QtPageMaster/pageitemdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ void PageItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& opti
continue;
}

QColor color;
color.fromString(splitted.front());
QColor color = QColor::fromString(splitted.front());
QRect bubbleRect = pdf::PDFPainterHelper::drawBubble(painter, tagPoint, color, splitted.back(), Qt::AlignLeft | Qt::AlignBottom);
tagPoint.ry() += bubbleRect.height() + verticalSpacing;
}
Expand Down
1 change: 1 addition & 0 deletions RELEASES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CURRENT:
- Issue #190: PageMaster crash + black bubbles instead of bubbles with correct color
- Issue #183: Option to ignore PDF security settings
- Issue #182: PDF4QT Document Diff command line cmd line arguments ignored
- Issue #181: where is the dark mode?
Expand Down

0 comments on commit b6fda40

Please sign in to comment.