]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: Small fixes on previous commit.
authorTill Kamppeter <till.kamppeter@gmail.com>
Sun, 16 Jan 2022 00:47:02 +0000 (21:47 -0300)
committerTill Kamppeter <till.kamppeter@gmail.com>
Sun, 16 Jan 2022 00:47:02 +0000 (21:47 -0300)
cupsfilters/ppdgenerator.c

index c808b508f934558e206abfc1acb067cc9c303a4a..6ac65f0c14da536d7b9fc674ec657b167291596d 100644 (file)
@@ -2650,7 +2650,7 @@ cfCreatePPDFromIPP2(char         *buffer,          /* I - Filename buffer */
         cupsFilePrintf(fp, "*ColorModel RGB/%s: \"\"\n",
                       (human_readable2 ? human_readable2 : "Color"));
 
-        if (!default_color)
+        if (!defattr)
          default_color = "RGB";
 
        /* Apparently some printers only advertise color support, so make sure
@@ -2669,7 +2669,7 @@ cfCreatePPDFromIPP2(char         *buffer,          /* I - Filename buffer */
       }
     }
 
-    if (default_pagesize != NULL) {
+    if (default_pagesize != NULL && (!default_color || !defattr)) {
       /* Here we are dealing with a cluster, if the default cluster color
          is not supplied we set it Gray*/
       if (default_cluster_color != NULL) {