From 89071835918e156326ff227c0e6f22a9790b6d47 Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Sat, 31 Aug 2024 19:56:04 +0200 Subject: [PATCH] Issue #205: Editor cannot create white, whitesmoke or transparent annotations --- Pdf4QtLibWidgets/sources/pdfobjecteditorwidget.cpp | 5 +++++ RELEASES.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/Pdf4QtLibWidgets/sources/pdfobjecteditorwidget.cpp b/Pdf4QtLibWidgets/sources/pdfobjecteditorwidget.cpp index bfd2e8b..90cb3cb 100644 --- a/Pdf4QtLibWidgets/sources/pdfobjecteditorwidget.cpp +++ b/Pdf4QtLibWidgets/sources/pdfobjecteditorwidget.cpp @@ -935,6 +935,11 @@ void PDFObjectEditorMappedColorAdapter::setValue(PDFObject object) const PDFReal blue = qBound(0.0, colors[2], 1.0); color = QColor::fromRgbF(red, green, blue); } + else if (colors.size() == 1) + { + const PDFReal gray = qBound(0.0, colors[0], 1.0); + color = QColor::fromRgbF(gray, gray, gray); + } int index = m_comboBox->findData(color); if (index != -1) diff --git a/RELEASES.txt b/RELEASES.txt index 7033812..2e13714 100644 --- a/RELEASES.txt +++ b/RELEASES.txt @@ -1,6 +1,7 @@ CURRENT: - Issue #207: Zoom to Cursor (Zoom Anchoring) - Issue #206: Name of the executable / command + - Issue #205: Editor cannot create white, whitesmoke or transparent annotations - Issue #185: Latest git fails to build in linux V: 1.4.0.0 4.7.2024