Explorar el Código

Preview: fix glitchy PlantUML preview when no background is specified

Le Tan hace 7 años
padre
commit
f9e9735d5f
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      src/utils/vutils.cpp

+ 4 - 1
src/utils/vutils.cpp

@@ -1748,7 +1748,10 @@ QPixmap VUtils::svgToPixmap(const QByteArray &p_content,
     }
 
     QPixmap pm(deSz);
-    if (!p_background.isEmpty()) {
+    if (p_background.isEmpty()) {
+        // Fill a transparent background to avoid glitchy preview.
+        pm.fill(QColor(255, 255, 255, 0));
+    } else {
         pm.fill(p_background);
     }