r25102 by jghali - Code cleanup for OutputPreview_PS and OutputPreview_PDF's renderPreviewSep()

scribus-commit scribus-commit at lists.scribus.net
Sun Jun 5 17:32:30 UTC 2022


Author: jghali
Date: Sun Jun  5 17:32:29 2022
New Revision: 25102

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25102
Log:
Code cleanup for OutputPreview_PS and OutputPreview_PDF's renderPreviewSep()

Modified:
    trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
    trunk/Scribus/scribus/ui/outputpreview_ps.cpp

Modified: trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25102&path=/trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_pdf.cpp	(original)
+++ trunk/Scribus/scribus/ui/outputpreview_pdf.cpp	Sun Jun  5 17:32:29 2022
@@ -740,15 +740,16 @@
 				counter++;
 			}
 		}
-	}
-	sepInfo.close();
+		sepInfo.close();
+	}
+
 	QString currSeps;
 	uint spc = 0;
 	for (int sp = 0; sp < spots.count(); ++sp)
 	{
 		currSeps += "(" + spots[sp] + ") ";
 		spc++;
-		if (sp > 6)
+		if (spc > 6)
 		{
 			args3.clear();
 			args3.append("-sDEVICE=tiffsep");
@@ -762,7 +763,7 @@
 			args3.append("-f");
 			args3.append(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/" +  m_tempBaseName + ".sep.ps"));
 			ret = System(gsExe, args1 + args3 + args2);
-			currSeps = "";
+			currSeps.clear();
 			spc = 0;
 		}
 	}

Modified: trunk/Scribus/scribus/ui/outputpreview_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25102&path=/trunk/Scribus/scribus/ui/outputpreview_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_ps.cpp	(original)
+++ trunk/Scribus/scribus/ui/outputpreview_ps.cpp	Sun Jun  5 17:32:29 2022
@@ -779,15 +779,16 @@
 				counter++;
 			}
 		}
-	}
-	sepInfo.close();
+		sepInfo.close();
+	}
+
 	QString currSeps;
 	uint spc = 0;
 	for (int sp = 0; sp < spots.count(); ++sp)
 	{
 		currSeps += "(" + spots[sp] + ") ";
 		spc++;
-		if (sp > 6)
+		if (spc > 6)
 		{
 			args3.clear();
 			args3.append("-sDEVICE=tiffsep");
@@ -801,7 +802,7 @@
 			args3.append("-f");
 			args3.append(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/" +  m_tempBaseName + ".sep.ps"));
 			ret = System(gsExe, args1 + args3 + args2);
-			currSeps = "";
+			currSeps.clear();
 			spc = 0;
 		}
 	}




More information about the scribus-commit mailing list