r18413 by jghali - #11691: Empty "profile" folder when collecting for output

scribus-commit scribus-commit at lists.scribus.net
Sun Aug 4 00:48:07 UTC 2013


Author: jghali
Date: Sun Aug  4 00:48:07 2013
New Revision: 18413

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18413
Log:
#11691: Empty "profile" folder when collecting for output

Modified:
    trunk/Scribus/scribus/collect4output.cpp

Modified: trunk/Scribus/scribus/collect4output.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18413&path=/trunk/Scribus/scribus/collect4output.cpp
==============================================================================
--- trunk/Scribus/scribus/collect4output.cpp (original)
+++ trunk/Scribus/scribus/collect4output.cpp Sun Aug  4 00:48:07 2013
@@ -48,11 +48,12 @@
 	dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
 	collectedFiles.clear();
 
+	if (m_withFonts)
+		fontCount = m_Doc->UsedFonts.count();
 	if (m_withProfiles)
 		m_Doc->getUsedProfiles(docProfiles);
-	if (m_withFonts)
-		fontCount=m_Doc->UsedFonts.count();
-	itemCount=m_Doc->MasterItems.count()+m_Doc->DocItems.count()+m_Doc->FrameItems.count();
+	profileCount = m_withProfiles ? docProfiles.count() : 0;
+	itemCount= m_Doc->MasterItems.count()+m_Doc->DocItems.count()+m_Doc->FrameItems.count();
 	patterns = m_Doc->getUsedPatterns();
 	patternCount=patterns.count();
 }
@@ -74,6 +75,12 @@
 		return false;
 	if (!m_outputDirectory.endsWith("/"))
 		m_outputDirectory += "/";
+
+	docProfiles.clear();
+	if (m_withProfiles)
+		m_Doc->getUsedProfiles(docProfiles);
+	fontCount = m_withFonts ? m_Doc->UsedFonts.count() : 0;
+	profileCount = m_withProfiles ? docProfiles.count() : 0;
 
 	QStringList directories;
 	directories.append(m_outputDirectory);
@@ -425,8 +432,8 @@
 
 bool CollectForOutput::collectProfiles()
 {
+	int c = 0;
 	ProfilesL::Iterator itend = docProfiles.end();
-	int c=0;
 	for (ProfilesL::Iterator it = docProfiles.begin(); it != itend; ++it)
 	{
 		QString profileName(it.key());




More information about the scribus-commit mailing list