r19371 by jghali - #12556: Units not updated in PDF Export > Pre-Press

scribus-commit scribus-commit at lists.scribus.net
Fri Jul 25 23:21:34 UTC 2014


Author: jghali
Date: Fri Jul 25 23:21:33 2014
New Revision: 19371

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19371
Log:
#12556: Units not updated in PDF Export > Pre-Press

Modified:
    trunk/Scribus/scribus/ui/newmarginwidget.cpp
    trunk/Scribus/scribus/ui/newmarginwidget.h
    trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
    trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
    trunk/Scribus/scribus/ui/prefs_printer.cpp

Modified: trunk/Scribus/scribus/ui/newmarginwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19371&path=/trunk/Scribus/scribus/ui/newmarginwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/newmarginwidget.cpp (original)
+++ trunk/Scribus/scribus/ui/newmarginwidget.cpp Fri Jul 25 23:21:33 2014
@@ -161,22 +161,24 @@
 	setPreset();
 }
 
-void NewMarginWidget::setNewUnitIndex(int newUnitIndex)
-{
-	leftMarginSpinBox->blockSignals(true);
-	rightMarginSpinBox->blockSignals(true);
-	topMarginSpinBox->blockSignals(true);
-	bottomMarginSpinBox->blockSignals(true);
-	m_unitIndex=newUnitIndex;
-	m_unitRatio=unitGetRatioFromIndex(newUnitIndex);
+void NewMarginWidget::setNewUnit(int newUnitIndex)
+{
+	bool leftSigBlocked   = leftMarginSpinBox->blockSignals(true);
+	bool rightSigBlocked  = rightMarginSpinBox->blockSignals(true);
+	bool topSigBlocked    = topMarginSpinBox->blockSignals(true);
+	bool bottomSigBlocked = bottomMarginSpinBox->blockSignals(true);
+
+	m_unitIndex = newUnitIndex;
+	m_unitRatio = unitGetRatioFromIndex(newUnitIndex);
 	topMarginSpinBox->setNewUnit(newUnitIndex);
 	bottomMarginSpinBox->setNewUnit(newUnitIndex);
 	leftMarginSpinBox->setNewUnit(newUnitIndex);
 	rightMarginSpinBox->setNewUnit(newUnitIndex);
-	leftMarginSpinBox->blockSignals(false);
-	rightMarginSpinBox->blockSignals(false);
-	topMarginSpinBox->blockSignals(false);
-	bottomMarginSpinBox->blockSignals(false);
+
+	leftMarginSpinBox->blockSignals(leftSigBlocked);
+	rightMarginSpinBox->blockSignals(rightSigBlocked);
+	topMarginSpinBox->blockSignals(topSigBlocked);
+	bottomMarginSpinBox->blockSignals(bottomSigBlocked);
 }
 
 void NewMarginWidget::setPreset()

Modified: trunk/Scribus/scribus/ui/newmarginwidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19371&path=/trunk/Scribus/scribus/ui/newmarginwidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/newmarginwidget.h (original)
+++ trunk/Scribus/scribus/ui/newmarginwidget.h Fri Jul 25 23:21:33 2014
@@ -29,7 +29,7 @@
 		void setPageHeight(double);
 		/*! \brief Set the page size for margin getting from cups */
 		void setPageSize(const QString&);
-		void setNewUnitIndex(int);
+		void setNewUnit(int unitIndex);
 		void setNewValues(const MarginStruct& margs);
 		/*! \brief Setup the presetCombo without changing the margin values, only used by tabdocument */
 		void setMarginPreset(int p);

Modified: trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19371&path=/trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentsetup.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_documentsetup.cpp Fri Jul 25 23:21:33 2014
@@ -75,10 +75,10 @@
 	unitRatio = unitGetRatioFromIndex(docUnitIndex);
 	pageWidthSpinBox->setValue(pageW * unitRatio);
 	pageHeightSpinBox->setValue(pageH * unitRatio);
-	marginsWidget->setNewUnitIndex(docUnitIndex);
+	marginsWidget->setNewUnit(docUnitIndex);
 	marginsWidget->setPageHeight(pageH);
 	marginsWidget->setPageWidth(pageW);
-	bleedsWidget->setNewUnitIndex(docUnitIndex);
+	bleedsWidget->setNewUnit(docUnitIndex);
 	bleedsWidget->setPageHeight(pageH);
 	bleedsWidget->setPageWidth(pageW);
 

Modified: trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19371&path=/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexport.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexport.cpp Fri Jul 25 23:21:33 2014
@@ -118,6 +118,8 @@
 	markOffsetSpinBox->setNewUnit(unitIndex);
 	markOffsetSpinBox->setMinimum(0);
 	markOffsetSpinBox->setMaximum(3000 * unitRatio);
+
+	bleedsWidget->setNewUnit(unitIndex);
 }
 
 void Prefs_PDFExport::languageChange()

Modified: trunk/Scribus/scribus/ui/prefs_printer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19371&path=/trunk/Scribus/scribus/ui/prefs_printer.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_printer.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_printer.cpp Fri Jul 25 23:21:33 2014
@@ -39,7 +39,7 @@
 
 void Prefs_Printer::unitChange(int newIndex)
 {
-	bleedsWidget->setNewUnitIndex(newIndex);
+	bleedsWidget->setNewUnit(newIndex);
 	markOffsetSpinBox->setNewUnit(newIndex);
 	markLengthSpinBox->setNewUnit(newIndex);
 }




More information about the scribus-commit mailing list