r19244 by fschmid - Bug #0012280: Malfunctioning gradient treatment. additional fix, don't try to colormanage "None" color.

scribus-commit scribus-commit at lists.scribus.net
Mon Jun 16 17:39:34 UTC 2014


Author: fschmid
Date: Mon Jun 16 17:39:34 2014
New Revision: 19244

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19244
Log:
Bug #0012280: Malfunctioning gradient treatment. additional fix, don't try to colormanage "None" color.

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19244&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Mon Jun 16 17:39:34 2014
@@ -2422,12 +2422,15 @@
 
 void PageItem::SetQColor(QColor *tmp, QString farbe, double shad)
 {
-	const ScColor& col = m_Doc->PageColors[farbe];
-	*tmp = ScColorEngine::getShadeColorProof(col, m_Doc, shad);
-	if (m_Doc->viewAsPreview)
-	{
-		VisionDefectColor defect;
-		*tmp = defect.convertDefect(*tmp, m_Doc->previewVisual);
+	if (farbe != CommonStrings::None)
+	{
+		const ScColor& col = m_Doc->PageColors[farbe];
+		*tmp = ScColorEngine::getShadeColorProof(col, m_Doc, shad);
+		if (m_Doc->viewAsPreview)
+		{
+			VisionDefectColor defect;
+			*tmp = defect.convertDefect(*tmp, m_Doc->previewVisual);
+		}
 	}
 }
 

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19244&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Mon Jun 16 17:39:34 2014
@@ -5094,14 +5094,17 @@
 		QList<VColorStop*> cstops = itGrad.value().colorStops();
 		for (uint cst = 0; cst < itGrad.value().Stops(); ++cst)
 		{
-			const ScColor& col = PageColors[cstops.at(cst)->name];
-			QColor tmp = ScColorEngine::getShadeColorProof(col, this, cstops.at(cst)->shade);
-			if (viewAsPreview)
-			{
-				VisionDefectColor defect;
-				tmp = defect.convertDefect(tmp, previewVisual);
-			}
-			cstops.at(cst)->color = tmp;
+			if (cstops.at(cst)->name != CommonStrings::None)
+			{
+				const ScColor& col = PageColors[cstops.at(cst)->name];
+				QColor tmp = ScColorEngine::getShadeColorProof(col, this, cstops.at(cst)->shade);
+				if (viewAsPreview)
+				{
+					VisionDefectColor defect;
+					tmp = defect.convertDefect(tmp, previewVisual);
+				}
+				cstops.at(cst)->color = tmp;
+			}
 		}
 	}
 




More information about the scribus-commit mailing list