r14813 by fschmid - Fixed the issue that "Delete Unused" in the ColorManager accidently removed colors from named gradients.

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 25 19:40:19 CET 2010


Revision: 14813
Author: fschmid
Date: 2010-02-25T09:07:22.947563Z
Commit message: Fixed the issue that "Delete Unused" in the ColorManager accidently removed colors from named gradients.

Changeset: 
M  /trunk/Scribus/scribus/scribusdoc.cpp

Diffs:
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(revision 14812)
+++ scribus/scribusdoc.cpp	(revision 14813)
@@ -953,7 +953,16 @@
 		{
 			pa.items.at(o)->getNamedResources(lists);
 		}
-	}	
+	}
+	QMap<QString,VGradient>::ConstIterator itg;
+	for (itg = docGradients.begin(); itg != docGradients.end(); ++itg)
+	{
+		QList<VColorStop*> cstops = itg.value().colorStops();
+		for (uint cst = 0; cst < itg.value().Stops(); ++cst)
+		{
+			lists.collectColor(cstops.at(cst)->name);
+		}
+	}
 }
 
 
@@ -5419,7 +5428,6 @@
 void ScribusDoc::removePageFromSection(const uint pageIndex)
 {
 	//Get the section of the new page index.
-	bool found = false;
 	uint fromIndex, toIndex;
 	DocumentSectionMap::Iterator it = sections.begin();
 	for (; it!= sections.end(); ++it)




More information about the scribus-commit mailing list