[LyX/master] Do not attempt to read bitmap icon with svg renderer

Juergen Spitzmueller spitz at lyx.org
Fri May 12 06:31:51 UTC 2023


commit 120ba1d3ec10b95031e0ffffed37a535aef0e52e
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Fri May 12 09:39:20 2023 +0200

    Do not attempt to read bitmap icon with svg renderer
    
    Pavel, this should cure your woes
---
 src/frontends/qt/GuiApplication.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index 1b29eec..5abab17 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -2683,7 +2683,7 @@ QPixmap GuiApplication::getScaledPixmap(QString imagedir, QString name) const
 	QPixmap pm = getPixmap(imagedir, name, "svgz,png");
 	FileName fname = imageLibFileSearch(imagedir, name, "svgz,png");
 	QString fpath = toqstr(fname.absFileName());
-	if (!fpath.isEmpty()) {
+	if (!fpath.isEmpty() && !fpath.endsWith(".png")) {
 		QSvgRenderer svgRenderer(fpath);
 		if (svgRenderer.isValid()) {
 			pm = QPixmap(pm.size() * dpr);


More information about the lyx-cvs mailing list