]> git.lyx.org Git - features.git/commitdiff
Do not attempt to read bitmap icon with svg renderer
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 12 May 2023 07:39:20 +0000 (09:39 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 12 May 2023 07:39:20 +0000 (09:39 +0200)
Pavel, this should cure your woes

src/frontends/qt/GuiApplication.cpp

index 1b29eec412a5fff4f2e57386c5464568959f822c..5abab17b5e906900c952add5ecf90985e7ec8851 100644 (file)
@@ -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);