r17890 by fschmid - Fixed size of imported patterns. Scaling controls in the pattern props dialog are now linked by default.

scribus-commit scribus-commit at lists.scribus.net
Wed Nov 21 20:53:09 UTC 2012


Author: fschmid
Date: Wed Nov 21 20:53:09 2012
New Revision: 17890

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17890
Log:
Fixed size of imported patterns. Scaling controls in the pattern props dialog are now linked by default.

Modified:
    trunk/Scribus/scribus/ui/cpalette.cpp
    trunk/Scribus/scribus/ui/paintmanager.cpp
    trunk/Scribus/scribus/ui/patternpropsdialog.h
    trunk/Scribus/scribus/ui/transparencypalette.cpp

Modified: trunk/Scribus/scribus/ui/cpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17890&path=/trunk/Scribus/scribus/ui/cpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/cpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/cpalette.cpp Wed Nov 21 20:53:09 2012
@@ -662,7 +662,7 @@
 		namedGradientStroke->addItem(pm, patK[a]);
 	}
 	namedGradient->blockSignals(sigBlocked1);
-	namedGradientStroke->blockSignals(sigBlocked1);
+	namedGradientStroke->blockSignals(sigBlocked2);
 }
 
 void Cpalette::setGradients(QHash<QString, VGradient> *docGradients)
@@ -1630,6 +1630,8 @@
 	PatternPropsDialog *dia = new PatternPropsDialog(this, currentUnit, false);
 	dia->spinXscaling->setValue(m_Pattern_scaleX);
 	dia->spinYscaling->setValue(m_Pattern_scaleY);
+	if (m_Pattern_scaleX == m_Pattern_scaleY)
+		dia->keepScaleRatio->setChecked(true);
 	dia->spinXoffset->setValue(m_Pattern_offsetX);
 	dia->spinYoffset->setValue(m_Pattern_offsetY);
 	dia->spinAngle->setValue(m_Pattern_rotation);
@@ -1683,6 +1685,8 @@
 	PatternPropsDialog *dia = new PatternPropsDialog(this, currentUnit, true);
 	dia->spinXscaling->setValue(m_Pattern_scaleXS);
 	dia->spinYscaling->setValue(m_Pattern_scaleYS);
+	if (m_Pattern_scaleXS == m_Pattern_scaleYS)
+		dia->keepScaleRatio->setChecked(true);
 	dia->spinXoffset->setValue(m_Pattern_offsetXS);
 	dia->spinYoffset->setValue(m_Pattern_offsetYS);
 	dia->spinAngle->setValue(m_Pattern_rotationS);

Modified: trunk/Scribus/scribus/ui/paintmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17890&path=/trunk/Scribus/scribus/ui/paintmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/paintmanager.cpp (original)
+++ trunk/Scribus/scribus/ui/paintmanager.cpp Wed Nov 21 20:53:09 2012
@@ -1156,7 +1156,7 @@
 			imgFormats.append("tiff");
 			imgFormats.append("pat");
 			imgFormats.append("psd");
-			imgFormats.append("pdf");
+		//	imgFormats.append("pdf");
 			imgFormats.append("eps");
 			imgFormats.append("epsi");
 			imgFormats.append("ps");
@@ -1349,6 +1349,12 @@
 		pat.pattern = currItem->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
 		pat.width = maxx - minx;
 		pat.height = maxy - miny;
+		currItem->setXYPos(0, 0, true);
+		currItem->setWidthHeight(maxx - minx, maxy - miny, true);
+		currItem->groupWidth = maxx - minx;
+		currItem->groupHeight = maxy - miny;
+		currItem->gWidth = maxx - minx;
+		currItem->gHeight = maxy - miny;
 		for (uint as = ac; as < ae; ++as)
 		{
 			pat.items.append(m_doc->Items->takeAt(ac));

Modified: trunk/Scribus/scribus/ui/patternpropsdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17890&path=/trunk/Scribus/scribus/ui/patternpropsdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/patternpropsdialog.h (original)
+++ trunk/Scribus/scribus/ui/patternpropsdialog.h Wed Nov 21 20:53:09 2012
@@ -53,6 +53,7 @@
 	ScrSpinBox* spinSpacing;
 	QToolButton* FlipH;
 	QToolButton* FlipV;
+	LinkButton* keepScaleRatio;
 	bool forStroke;
 
 public slots:
@@ -73,7 +74,6 @@
 	QGroupBox* groupScale;
 	QLabel* textLabel5;
 	QLabel* textLabel6;
-	LinkButton* keepScaleRatio;
 	QGroupBox* groupRotation;
 	QLabel* textLabel7;
 	QGroupBox* groupSkew;

Modified: trunk/Scribus/scribus/ui/transparencypalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17890&path=/trunk/Scribus/scribus/ui/transparencypalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/transparencypalette.cpp (original)
+++ trunk/Scribus/scribus/ui/transparencypalette.cpp Wed Nov 21 20:53:09 2012
@@ -495,6 +495,8 @@
 	PatternPropsDialog *dia = new PatternPropsDialog(this, currentUnit, false);
 	dia->spinXscaling->setValue(m_Pattern_scaleX);
 	dia->spinYscaling->setValue(m_Pattern_scaleY);
+	if (m_Pattern_scaleX == m_Pattern_scaleY)
+		dia->keepScaleRatio->setChecked(true);
 	dia->spinXoffset->setValue(m_Pattern_offsetX);
 	dia->spinYoffset->setValue(m_Pattern_offsetY);
 	dia->spinAngle->setValue(m_Pattern_rotation);




More information about the scribus-commit mailing list