r16805 by jghali - make gradient vector edit work again

scribus-commit scribus-commit at lists.scribus.net
Fri Aug 26 22:29:39 UTC 2011


Author: jghali
Date: Fri Aug 26 22:29:39 2011
New Revision: 16805

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16805
Log:
make gradient vector edit work again

Modified:
    branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_color.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_color.h
    branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_transparency.h
    branches/ScribusOIF/scribus/ui/transparencypalette.cpp

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16805&path=/branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp Fri Aug 26 22:29:39 2011
@@ -95,10 +95,10 @@
 	connect(textFlowBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(handleTextFlow()));
 
 	connect(customShape  , SIGNAL(FormSel(int, int, qreal *)), this, SLOT(handleNewShape(int, int, qreal *)));
-	connect(editShape, SIGNAL(clicked())                 , this, SLOT(handleShapeEdit()));
-	connect(evenOdd    , SIGNAL(clicked())                 , this, SLOT(handleFillRule()) );
-	connect(nonZero    , SIGNAL(clicked())                 , this, SLOT(handleFillRule()) );
-	connect(transPalWidget , SIGNAL(editGradient())            , this, SLOT(handleGradientEdit()));
+	connect(editShape    , SIGNAL(clicked())                 , this, SLOT(handleShapeEdit()));
+	connect(evenOdd      , SIGNAL(clicked())                 , this, SLOT(handleFillRule()) );
+	connect(nonZero      , SIGNAL(clicked())                 , this, SLOT(handleFillRule()) );
+	connect(transPalWidget , SIGNAL(editGradient())          , this, SLOT(handleGradientEdit()));
 	connect(transPalWidget , SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)), this, SLOT(handleSpecialGradient(double, double, double, double, double, double, double, double )));
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_color.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16805&path=/branches/ScribusOIF/scribus/ui/propertywidget_color.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_color.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_color.cpp Fri Aug 26 22:29:39 2011
@@ -49,9 +49,9 @@
 	m_blockUpdates = 0;
 	m_item = NULL;
 	patternList = NULL;
-	CGradDia = NULL;
-	CGradDia = new GradientVectorDialog(this->parentWidget());
-	CGradDia->hide();
+	m_gradDia = NULL;
+	m_gradDia = new GradientVectorDialog(this->parentWidget());
+	m_gradDia->hide();
 
 	setupUi(this);
 	fillModeCombo->addItem( tr("Solid") );
@@ -68,14 +68,14 @@
 	connect(editLineColorSelector, SIGNAL(clicked()), this, SLOT(editLineColorSelectorButton()));
 	connect(editFillColorSelector, SIGNAL(clicked()), this, SLOT(editFillColorSelectorButton()));
 
-	connect(CGradDia, SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)), this, SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)));
-	connect(CGradDia, SIGNAL(paletteShown(bool)), this, SLOT(setActiveGradDia(bool)));
-	connect(CGradDia, SIGNAL(editGradient(int)), this, SIGNAL(editGradient(int)));
-	connect(CGradDia, SIGNAL(createNewMesh()), this, SLOT(createNewMeshGradient()));
-	connect(CGradDia, SIGNAL(resetMesh()), this, SLOT(resetMeshGradient()));
-	connect(CGradDia, SIGNAL(meshToShape()), this, SLOT(meshGradientToShape()));
-	connect(CGradDia, SIGNAL(reset1Control()), this, SLOT(resetOneControlPoint()));
-	connect(CGradDia, SIGNAL(resetAllControl()), this, SLOT(resetAllControlPoints()));
+	connect(m_gradDia, SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)), this, SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)));
+	connect(m_gradDia, SIGNAL(paletteShown(bool)), this, SLOT(setActiveGradDia(bool)));
+	connect(m_gradDia, SIGNAL(editGradient(int)), this, SLOT(toggleGradientEdit(int)));
+	connect(m_gradDia, SIGNAL(createNewMesh()), this, SLOT(createNewMeshGradient()));
+	connect(m_gradDia, SIGNAL(resetMesh()), this, SLOT(resetMeshGradient()));
+	connect(m_gradDia, SIGNAL(meshToShape()), this, SLOT(meshGradientToShape()));
+	connect(m_gradDia, SIGNAL(reset1Control()), this, SLOT(resetOneControlPoint()));
+	connect(m_gradDia, SIGNAL(resetAllControl()), this, SLOT(resetAllControlPoints()));
 
 	fillStrokeStack->setCurrentIndex(0);
 	editFillColorSelector->setChecked(true);
@@ -199,7 +199,7 @@
 	if ((item == NULL) || (m_item != item))
 	{
 		editStrokeGradient = 0;
-		CGradDia->hide();
+		m_gradDia->hide();
 		editMeshColors->setEnabled(true);
 		gradEditButton->setEnabled(true);
 	}
@@ -337,6 +337,34 @@
 		if (strokeModeCombo->count() == 3)
 			strokeModeCombo->removeItem(2);
 	}
+}
+
+void PropertyWidget_Color::toggleGradientEdit(int stroke)
+{
+	ScribusView* view = m_doc->view();
+
+	if (!m_doc || !m_item) return;
+
+	view->editStrokeGradient = stroke;
+	if (stroke == 1)
+	{
+		int appMode = modeNormal;
+		if (gradEditButtonStroke->isChecked())
+			appMode = modeEditGradientVectors;
+		view->requestMode(appMode);
+	}
+	else
+	{
+		int appMode = modeNormal;
+		if ((gradEditButton->isChecked()) || (editMeshColors->isChecked()))
+		{
+			appMode = modeEditGradientVectors;
+			if ((stroke == 5) || (stroke == 6) || (stroke == 7))
+				appMode = modeEditMeshGradient;
+		}
+		view->requestMode(appMode);
+	}
+	view->RefreshGradient(m_item);
 }
 
 void PropertyWidget_Color::handleSelectionChanged()
@@ -854,7 +882,7 @@
 		else if (number == 9)
 		{
 			stackedWidget_2->setCurrentIndex(1);
-			gradientType->setCurrentIndex(2);
+			gradientType->setCurrentIndex(3);
 			if ((m_item->GrColorP1 != CommonStrings::None) && (!m_item->GrColorP1.isEmpty()))
 				setCurrentComboItem(colorPoint1, m_item->GrColorP1);
 			else
@@ -1115,7 +1143,7 @@
 		editStrokeGradient = 0;
 		gradEditButton->setEnabled(true);
 	}
-	emit editGradient(editStrokeGradient);
+	this->toggleGradientEdit(editStrokeGradient);
 }
 
 void PropertyWidget_Color::createNewMeshGradient()
@@ -1182,34 +1210,34 @@
 {
 	if (gradEditButton->isChecked())
 	{
-		CGradDia->unitChange(m_doc->unitIndex());
-		CGradDia->setValues(m_item->GrStartX, m_item->GrStartY, m_item->GrEndX, m_item->GrEndY, m_item->GrFocalX, m_item->GrFocalY, m_item->GrScale, m_item->GrSkew, 0, 0);
+		m_gradDia->unitChange(m_doc->unitIndex());
+		m_gradDia->setValues(m_item->GrStartX, m_item->GrStartY, m_item->GrEndX, m_item->GrEndY, m_item->GrFocalX, m_item->GrFocalY, m_item->GrScale, m_item->GrSkew, 0, 0);
 		if (m_item->GrType == 6)
-			CGradDia->selectLinear();
+			m_gradDia->selectLinear();
 		else if (m_item->GrType == 7)
-			CGradDia->selectRadial();
+			m_gradDia->selectRadial();
 		else if (m_item->GrType == 9)
 		{
-			CGradDia->setValues(m_item->GrControl1.x(), m_item->GrControl1.y(), m_item->GrControl2.x(), m_item->GrControl2.y(), m_item->GrControl3.x(), m_item->GrControl3.y(), m_item->GrControl4.x(), m_item->GrControl4.y(), 0, 0);
-			CGradDia->selectFourColor();
+			m_gradDia->setValues(m_item->GrControl1.x(), m_item->GrControl1.y(), m_item->GrControl2.x(), m_item->GrControl2.y(), m_item->GrControl3.x(), m_item->GrControl3.y(), m_item->GrControl4.x(), m_item->GrControl4.y(), 0, 0);
+			m_gradDia->selectFourColor();
 		}
 		else if (m_item->GrType == 10)
 		{
-			CGradDia->setValues(m_item->GrControl1.x(), m_item->GrControl1.y(), m_item->GrControl2.x(), m_item->GrControl2.y(), m_item->GrControl3.x(), m_item->GrControl3.y(), m_item->GrControl4.x(), m_item->GrControl4.y(), m_item->GrControl5.x(), m_item->GrControl5.y());
-			CGradDia->selectDiamond();
+			m_gradDia->setValues(m_item->GrControl1.x(), m_item->GrControl1.y(), m_item->GrControl2.x(), m_item->GrControl2.y(), m_item->GrControl3.x(), m_item->GrControl3.y(), m_item->GrControl4.x(), m_item->GrControl4.y(), m_item->GrControl5.x(), m_item->GrControl5.y());
+			m_gradDia->selectDiamond();
 		}
 		else if (m_item->GrType == 11)
 		{
-			CGradDia->selectMesh();
+			m_gradDia->selectMesh();
 			editMeshColors->setEnabled(false);
 		}
 		else if (m_item->GrType == 13)
-			CGradDia->selectConical();
-		CGradDia->show();
-	}
-	else
-	{
-		CGradDia->hide();
+			m_gradDia->selectConical();
+		m_gradDia->show();
+	}
+	else
+	{
+		m_gradDia->hide();
 		editMeshColors->setEnabled(true);
 	}
 	if (m_item->GrType == 9)
@@ -1220,27 +1248,27 @@
 		editStrokeGradient = 5;
 	else
 		editStrokeGradient = 0;
-	emit editGradient(editStrokeGradient);
+	this->toggleGradientEdit(editStrokeGradient);
 }
 
 void PropertyWidget_Color::editGradientVectorStroke()
 {
 	if (gradEditButtonStroke->isChecked())
 	{
-		CGradDia->unitChange(m_doc->unitIndex());
-		CGradDia->setValues(m_item->GrStrokeStartX, m_item->GrStrokeStartY, m_item->GrStrokeEndX, m_item->GrStrokeEndY, m_item->GrStrokeFocalX, m_item->GrStrokeFocalY, m_item->GrStrokeScale, m_item->GrStrokeSkew, 0, 0);
+		m_gradDia->unitChange(m_doc->unitIndex());
+		m_gradDia->setValues(m_item->GrStrokeStartX, m_item->GrStrokeStartY, m_item->GrStrokeEndX, m_item->GrStrokeEndY, m_item->GrStrokeFocalX, m_item->GrStrokeFocalY, m_item->GrStrokeScale, m_item->GrStrokeSkew, 0, 0);
 		if (m_item->GrTypeStroke == 6)
-			CGradDia->selectLinear();
+			m_gradDia->selectLinear();
 		else
-			CGradDia->selectRadial();
-		CGradDia->show();
-	}
-	else
-	{
-		CGradDia->hide();
+			m_gradDia->selectRadial();
+		m_gradDia->show();
+	}
+	else
+	{
+		m_gradDia->hide();
 	}
 	editStrokeGradient = 1;
-	emit editGradient(editStrokeGradient);
+	this->toggleGradientEdit(editStrokeGradient);
 }
 
 void PropertyWidget_Color::setActiveGradDia(bool active)
@@ -1251,15 +1279,15 @@
 			gradEditButtonStroke->setChecked(false);
 		else
 			gradEditButton->setChecked(false);
-		emit editGradient(editStrokeGradient);
+		this->toggleGradientEdit(editStrokeGradient);
 		editMeshColors->setEnabled(true);
 	}
 }
 
 void PropertyWidget_Color::setSpecialGradient(double x1, double y1, double x2, double y2, double fx, double fy, double sg, double sk, double cx, double cy)
 {
-	if (CGradDia)
-		CGradDia->setValues(x1, y1, x2, y2, fx, fy, sg, sk, cx, cy);
+	if (m_gradDia)
+		m_gradDia->setValues(x1, y1, x2, y2, fx, fy, sg, sk, cx, cy);
 }
 
 void PropertyWidget_Color::setMeshPoint()
@@ -1438,8 +1466,8 @@
 {
 	if (!m_doc)
 		return;
-	if (CGradDia)
-		CGradDia->unitChange(m_doc->unitIndex());
+	if (m_gradDia)
+		m_gradDia->unitChange(m_doc->unitIndex());
 	currentUnit = m_doc->unitIndex();
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_color.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16805&path=/branches/ScribusOIF/scribus/ui/propertywidget_color.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_color.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_color.h Fri Aug 26 22:29:39 2011
@@ -73,6 +73,8 @@
 	void handleSelectionChanged();
 	void handleUpdateRequest(int);
 
+	void toggleGradientEdit(int stroke);
+
 	void editLineColorSelectorButton();
 	void editFillColorSelectorButton();
 	void displayColorValues(QString stroke, QString fille, int sShade, int fShade);
@@ -135,10 +137,9 @@
 	void NewPatternPropsS(double, double, double, double, double, double, double, double, bool, bool);
 	void NewSpecial(double, double, double, double, double, double, double, double, double, double);
 	void NewOverprint(int);
-	void editGradient(int);
 
 protected:
-	GradientVectorDialog* CGradDia;
+	GradientVectorDialog* m_gradDia;
 
 	PageItem* m_item;
 	QString   m_color;

Modified: branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16805&path=/branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp Fri Aug 26 22:29:39 2011
@@ -36,15 +36,17 @@
 {
 	m_item = NULL;
 	patternList = NULL;
-	TGradDia = NULL;
-	TGradDia = new GradientVectorDialog(this->parentWidget());
-	TGradDia->hide();
+	m_gradDia = NULL;
+	m_gradDia = new GradientVectorDialog(this->parentWidget());
+	m_gradDia->hide();
 	setupUi(this);
 
 	editLineSelector->setIcon(QIcon(loadIcon("16/color-stroke.png")));
 	editFillSelector->setIcon(QIcon(loadIcon("16/color-fill.png")));
 	editFillSelector->setChecked(true);
 	editFillSelectorButton();
+
+	connect(m_gradDia, SIGNAL(editGradient(int)), this, SLOT(toggleGradientEdit()));
 
 	transModeCombo->addItem( tr("Solid") );
 	transModeCombo->addItem( tr("Gradient") );
@@ -96,6 +98,8 @@
 	disconnect(transpCalcGradient, SIGNAL(clicked())       , this, SLOT(switchGradientMode()));
 	disconnect(transpCalcPattern , SIGNAL(clicked())       , this, SLOT(switchPatternMode()));
 	disconnect(usePatternInverted, SIGNAL(clicked()       ), this, SLOT(switchPatternMode()));
+
+	if (!m_doc) return;
 
 	disconnect(this, SIGNAL(NewTrans(double))   , m_doc, SLOT(itemSelection_SetItemFillTransparency(double)));
 	disconnect(this, SIGNAL(NewTransS(double))  , m_doc, SLOT(itemSelection_SetItemLineTransparency(double)));
@@ -441,19 +445,19 @@
 {
 	if (gradEditButton->isChecked())
 	{
-		TGradDia->unitChange(m_doc->unitIndex());
-		TGradDia->setValues(m_item->GrMaskStartX, m_item->GrMaskStartY, m_item->GrMaskEndX, m_item->GrMaskEndY, m_item->GrMaskFocalX, m_item->GrMaskFocalY, m_item->GrMaskScale, m_item->GrMaskSkew, 0, 0);
+		m_gradDia->unitChange(m_doc->unitIndex());
+		m_gradDia->setValues(m_item->GrMaskStartX, m_item->GrMaskStartY, m_item->GrMaskEndX, m_item->GrMaskEndY, m_item->GrMaskFocalX, m_item->GrMaskFocalY, m_item->GrMaskScale, m_item->GrMaskSkew, 0, 0);
 		if ((m_item->GrMask == 1) || (m_item->GrMask == 4))
-			TGradDia->selectLinear();
-		else
-			TGradDia->selectRadial();
-		TGradDia->show();
-	}
-	else
-	{
-		TGradDia->hide();
-	}
-	emit editGradient();
+			m_gradDia->selectLinear();
+		else
+			m_gradDia->selectRadial();
+		m_gradDia->show();
+	}
+	else
+	{
+		m_gradDia->hide();
+	}
+	this->toggleGradientEdit();
 }
 
 void PropertyWidget_Transparency::setActiveGradDia(bool active)
@@ -461,14 +465,14 @@
 	if (!active)
 	{
 		gradEditButton->setChecked(false);
-		emit editGradient();
+		this->toggleGradientEdit();
 	}
 }
 
 void PropertyWidget_Transparency::setSpecialGradient(double x1, double y1, double x2, double y2, double fx, double fy, double sg, double sk)
 {
-	if (TGradDia)
-		TGradDia->setValues(x1, y1, x2, y2, fx, fy, sg, sk, 0, 0);
+	if (m_gradDia)
+		m_gradDia->setValues(x1, y1, x2, y2, fx, fy, sg, sk, 0, 0);
 }
 
 void PropertyWidget_Transparency::hideEditedPatterns(QStringList names)
@@ -574,6 +578,21 @@
 	delete dia;
 }
 
+void PropertyWidget_Transparency::toggleGradientEdit(int)
+{
+	ScribusView* view = m_doc->view();
+
+	if (!m_doc || !m_item) return;
+	if (m_doc->scMW()->scriptIsRunning()) return;
+
+	view->editStrokeGradient = 2;
+
+	int appMode = modeNormal;
+	if (gradEditButton->isChecked())
+		appMode = modeEditGradientVectors;
+	view->requestMode(appMode);
+}
+
 void PropertyWidget_Transparency::setActTrans(double val, double val2)
 {
 	disconnect(strokeOpacity, SIGNAL(valueChanged(int)), this, SLOT(slotTransS(int)));
@@ -644,8 +663,8 @@
 {
 	if (!m_doc)
 		return;
-	if (TGradDia)
-		TGradDia->unitChange(m_doc->unitIndex());
+	if (m_gradDia)
+		m_gradDia->unitChange(m_doc->unitIndex());
 	currentUnit = m_doc->unitIndex();
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_transparency.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16805&path=/branches/ScribusOIF/scribus/ui/propertywidget_transparency.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_transparency.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_transparency.h Fri Aug 26 22:29:39 2011
@@ -79,7 +79,7 @@
 	int currentUnit;
 
 	ColorList colorList;
-	GradientVectorDialog* TGradDia;
+	GradientVectorDialog* m_gradDia;
 	QMap<QString, ScPattern> *patternList;
 	QMap<QString, VGradient> *gradientList;
 	
@@ -99,6 +99,7 @@
 	void handleUpdateRequest(int);
 
 	void changePatternProps();
+	void toggleGradientEdit(int dummy = 0);
 
 	void editFillSelectorButton();
 	void editLineSelectorButton();
@@ -133,7 +134,6 @@
 	void NewBlend(int);
 	void NewBlendS(int);
 	void gradientChanged();
-	void editGradient();
 	void NewGradient(int);
 	void NewSpecial(double, double, double, double, double, double, double, double, double, double);
 	void NewPattern(QString);

Modified: branches/ScribusOIF/scribus/ui/transparencypalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16805&path=/branches/ScribusOIF/scribus/ui/transparencypalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/transparencypalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/transparencypalette.cpp Fri Aug 26 22:29:39 2011
@@ -59,7 +59,7 @@
 	connect(editPatternProps, SIGNAL(clicked()), this, SLOT(changePatternProps()));
 	connect(transpCalcGradient, SIGNAL(clicked()), this, SLOT(switchGradientMode()));
 	connect(transpCalcPattern, SIGNAL(clicked()), this, SLOT(switchPatternMode()));
-	connect(usePatternInverted, SIGNAL(clicked()), this, SLOT(switchPatternMode()));
+	connect(usePatternInverted, SIGNAL(clicked()), this, SLOT(switchPatternMode()));
 }
 
 void Tpalette::setCurrentItem(PageItem* item)
@@ -140,7 +140,7 @@
 	disconnect(gradientType, SIGNAL(activated(int)), this, SLOT(slotGradType(int)));
 	disconnect(transpCalcGradient, SIGNAL(clicked()), this, SLOT(switchGradientMode()));
 	disconnect(transpCalcPattern, SIGNAL(clicked()), this, SLOT(switchPatternMode()));
-	disconnect(usePatternInverted, SIGNAL(clicked()), this, SLOT(switchPatternMode()));
+	disconnect(usePatternInverted, SIGNAL(clicked()), this, SLOT(switchPatternMode()));
 	gradEdit->setGradient(currentItem->mask_gradient);
 	if (!currentItem->gradientMask().isEmpty())
 	{
@@ -164,13 +164,13 @@
 		tabWidget->setTabEnabled(2, true);
 	transpCalcGradient->setChecked(false);
 	transpCalcPattern->setChecked(false);
-	usePatternInverted->setChecked(false);
+	usePatternInverted->setChecked(false);
 	if ((currentItem->GrMask == 4) || (currentItem->GrMask == 5))
 		transpCalcGradient->setChecked(true);
-	if ((currentItem->GrMask == 6) || (currentItem->GrMask == 7))
+	if ((currentItem->GrMask == 6) || (currentItem->GrMask == 7))
 		transpCalcPattern->setChecked(true);
-	if ((currentItem->GrMask == 7) || (currentItem->GrMask == 8))
-		usePatternInverted->setChecked(true);
+	if ((currentItem->GrMask == 7) || (currentItem->GrMask == 8))
+		usePatternInverted->setChecked(true);
 	if ((currentItem->GrMask == 1) || (currentItem->GrMask == 4))
 		gradientType->setCurrentIndex(0);
 	else if ((currentItem->GrMask == 2) || (currentItem->GrMask == 5))
@@ -188,7 +188,7 @@
 	connect(gradientType, SIGNAL(activated(int)), this, SLOT(slotGradType(int)));
 	connect(transpCalcGradient, SIGNAL(clicked()), this, SLOT(switchGradientMode()));
 	connect(transpCalcPattern, SIGNAL(clicked()), this, SLOT(switchPatternMode()));
-	connect(usePatternInverted, SIGNAL(clicked()), this, SLOT(switchPatternMode()));
+	connect(usePatternInverted, SIGNAL(clicked()), this, SLOT(switchPatternMode()));
 }
 
 void Tpalette::updateCList()
@@ -275,19 +275,19 @@
 	else if (number == 2)
 	{
 		if (transpCalcPattern->isChecked())
-		{
-			if (usePatternInverted->isChecked())
-				emit NewGradient(7);
-			else
-				emit NewGradient(6);
-		}
-		else
-		{
-			if (usePatternInverted->isChecked())
-				emit NewGradient(8);
-			else
-				emit NewGradient(3);
-		}
+		{
+			if (usePatternInverted->isChecked())
+				emit NewGradient(7);
+			else
+				emit NewGradient(6);
+		}
+		else
+		{
+			if (usePatternInverted->isChecked())
+				emit NewGradient(8);
+			else
+				emit NewGradient(3);
+		}
 	}
 	else
 		emit NewGradient(0);
@@ -362,19 +362,19 @@
 void Tpalette::switchPatternMode()
 {
 	if (transpCalcPattern->isChecked())
-	{
-		if (usePatternInverted->isChecked())
-			emit NewGradient(7);
-		else
-			emit NewGradient(6);
-	}
-	else
-	{
-		if (usePatternInverted->isChecked())
-			emit NewGradient(8);
-		else
-			emit NewGradient(3);
-	}
+	{
+		if (usePatternInverted->isChecked())
+			emit NewGradient(7);
+		else
+			emit NewGradient(6);
+	}
+	else
+	{
+		if (usePatternInverted->isChecked())
+			emit NewGradient(8);
+		else
+			emit NewGradient(3);
+	}
 }
 
 void Tpalette::editGradientVector()




More information about the scribus-commit mailing list