r16547 by jghali - #9899 related : fix transparency and blend mode value update problem in PP when switching from 'solid fill' mode to 'gradient' mode and back

scribus-commit scribus-commit at lists.scribus.net
Sun Apr 3 17:30:45 CEST 2011


Author: jghali
Date: Sun Apr  3 15:30:45 2011
New Revision: 16547

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16547
Log:
#9899 related : fix transparency and blend mode value update problem in PP when switching from 'solid fill' mode to 'gradient' mode and back

Modified:
    branches/Version135/Scribus/scribus/cpalette.cpp

Modified: branches/Version135/Scribus/scribus/cpalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16547&path=/branches/Version135/Scribus/scribus/cpalette.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/cpalette.cpp (original)
+++ branches/Version135/Scribus/scribus/cpalette.cpp Sun Apr  3 15:30:45 2011
@@ -708,10 +708,7 @@
 		gradEdit->Preview->fill_gradient = currentItem->fill_gradient;
 		gradEdit->Preview->updateDisplay();
 	}
-	if (number > 0)
-		blendMode->setEnabled(false);
-	else
-		blendMode->setEnabled(true);
+	blendMode->setEnabled(number <= 0);
 	emit NewGradient(number);
 }
 
@@ -722,6 +719,8 @@
 		gradientQCombo->setCurrentIndex(0);
 		currentGradient = 0;
 	}
+
+	currentGradient = (number > 0) ? number : 0;
 	//no need to disconnect as qcombobox only emits from user action
 	/* PFJ - 29.02.04 - Removed GradGroup and Gradient mode from switch */
 	GradientMode = number == 0 ? false : number == 8 ? false : true;
@@ -789,16 +788,20 @@
 	disconnect(PM1, SIGNAL(valueChanged(int)), this, SLOT(setActShade()));
 	// JG probably not needed at all and should probably not be here
 	updateCList();
-	switch (number)
-	{
-	case 0:
+	if (number == 0)
+	{
 		PM1->setValue(Shade3);
 		updateBoxS(Color3);
-		break;
-	default:
+		if (currentItem)
+		{
+			setActTrans(currentItem->fillTransparency(), currentItem->lineTransparency());
+			setActBlend(currentItem->fillBlendmode(), currentItem->lineBlendmode());
+		}
+	}
+	else
+	{
 		PM1->setValue(Shade);
 		updateBoxS(Color);
-		break;
 	}
 //	setFocus();
 	repaint();




More information about the scribus-commit mailing list