r14163 by fschmid - Fixed issues of the new gradient selector in the color tab of the properties palette.

scribus-commit scribus-commit at lists.scribus.net
Fri Oct 16 23:15:27 CEST 2009


Revision: 14163
Author: fschmid
Date: 2009-10-16T19:19:46.096197Z
Commit message: Fixed issues of the new gradient selector in the color tab of the properties palette.

Changeset: 
M  /trunk/Scribus/scribus/ui/propertiespalette.cpp
M  /trunk/Scribus/scribus/ui/cpalette.cpp
M  /trunk/Scribus/scribus/scribusdoc.cpp

Diffs:
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(revision 14162)
+++ scribus/scribusdoc.cpp	(revision 14163)
@@ -5739,6 +5739,7 @@
 							}
 						}
 					}
+					break;
 				case 1:
 					currItem->GrStartX = 0;
 					currItem->GrStartY = currItem->height() / 2.0;
@@ -5780,7 +5781,7 @@
 				default:
 					break;
 			}
-			if (typ != 8)
+			if ((typ > 0) && (typ < 8))
 				currItem->updateGradientVectors();
 			currItem->update();
 		}
Index: scribus/ui/cpalette.cpp
===================================================================
--- scribus/ui/cpalette.cpp	(revision 14162)
+++ scribus/ui/cpalette.cpp	(revision 14163)
@@ -675,11 +675,24 @@
 {
 	if (number == 1)
 	{
-		gradEdit->setGradient(currentItem->fill_gradient);
+		disconnect(namedGradient, SIGNAL(activated(const QString &)), this, SLOT(setNamedGradient(const QString &)));
+		if (!currentItem->gradient().isEmpty())
+		{
+			setCurrentComboItem(namedGradient, currentItem->gradient());
+			gradEdit->setGradient(gradientList->value(currentItem->gradient()));
+			gradEdit->setGradientEditable(false);
+		}
+		else
+		{
+			namedGradient->setCurrentIndex(0);
+			gradEdit->setGradient(currentItem->fill_gradient);
+			gradEdit->setGradientEditable(true);
+		}
 		if (gradientType->currentIndex() == 0)
 			emit NewGradient(6);
 		else
-			emit NewGradient(7);
+			currentItem->GrType = 7;
+		connect(namedGradient, SIGNAL(activated(const QString &)), this, SLOT(setNamedGradient(const QString &)));
 	}
 	else if (number == 2)
 		emit NewGradient(8);
Index: scribus/ui/propertiespalette.cpp
===================================================================
--- scribus/ui/propertiespalette.cpp	(revision 14162)
+++ scribus/ui/propertiespalette.cpp	(revision 14163)
@@ -1810,13 +1810,8 @@
 		}
 		else if (t == idColorsItem)
 		{
-			Cpal->setActGradient(CurItem->GrType);
-			updateColorSpecialGradient();
-			Cpal->gradEdit->setGradient(CurItem->fill_gradient);
-			if (CurItem->doOverprint)
-				Cpal->setActOverprint(1);
-			else
-				Cpal->setActOverprint(0);
+			Cpal->setCurrentItem(CurItem);
+			Cpal->updateFromItem();
 		}
 		else if (t == idGroupItem)
 		{
@@ -2065,8 +2060,8 @@
 	updateColorSpecialGradient();
 	Cpal->gradEdit->Preview->fill_gradient = CurItem->fill_gradient;
 	Cpal->gradEdit->Preview->updateDisplay(); */
-	updateColorSpecialGradient();
-	Cpal->gradEdit->setGradient(CurItem->fill_gradient);
+//	updateColorSpecialGradient();
+//	Cpal->gradEdit->setGradient(CurItem->fill_gradient);
 	if (CurItem->FrameType == 0)
 		SCustom->setIcon(SCustom->getIconPixmap(0));
 	if (CurItem->FrameType == 1)




More information about the scribus-commit mailing list