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

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


Author: jghali
Date: Sun Jun  5 17:30:13 2022
New Revision: 25101

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

Modified:
    branches/Version15x/Scribus/scribus/ui/outputpreview_pdf.cpp
    branches/Version15x/Scribus/scribus/ui/outputpreview_ps.cpp

Modified: branches/Version15x/Scribus/scribus/ui/outputpreview_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25101&path=/branches/Version15x/Scribus/scribus/ui/outputpreview_pdf.cpp
==============================================================================
--- branches/Version15x/Scribus/scribus/ui/outputpreview_pdf.cpp	(original)
+++ branches/Version15x/Scribus/scribus/ui/outputpreview_pdf.cpp	Sun Jun  5 17:30:13 2022
@@ -740,15 +740,16 @@
 				counter++;
 			}
 		}
-	}
-	sepInfo.close();
-	QString currSeps = "";
+		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: branches/Version15x/Scribus/scribus/ui/outputpreview_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25101&path=/branches/Version15x/Scribus/scribus/ui/outputpreview_ps.cpp
==============================================================================
--- branches/Version15x/Scribus/scribus/ui/outputpreview_ps.cpp	(original)
+++ branches/Version15x/Scribus/scribus/ui/outputpreview_ps.cpp	Sun Jun  5 17:30:13 2022
@@ -779,15 +779,16 @@
 				counter++;
 			}
 		}
-	}
-	sepInfo.close();
-	QString currSeps = "";
+		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