r22465 by jghali - fix actions being unnecessarily triggered when updating hyphenation properties

scribus-commit scribus-commit at lists.scribus.net
Thu Apr 5 20:31:50 UTC 2018


Author: jghali
Date: Thu Apr  5 20:31:50 2018
New Revision: 22465

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22465
Log:
fix actions being unnecessarily triggered when updating hyphenation properties

Modified:
    trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp

Modified: trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22465&path=/trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp	Thu Apr  5 20:31:50 2018
@@ -4,6 +4,9 @@
 a copyright and/or license notice that predates the release of Scribus 1.3.2
 for which a new license (GPL+exception) is in place.
 */
+
+#include <QSignalBlocker>
+
 #include "propertywidget_hyphenation.h"
 
 #include "appmodes.h"
@@ -123,6 +126,9 @@
 	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 
+	QSignalBlocker smallestWordSpinBoxBlocker(smallestWordSpinBox);
+	QSignalBlocker hyphenCharLineEditBlocker(hyphenCharLineEdit);
+
 	smallestWordSpinBox->setValue(charStyle.hyphenWordMin());
 	uint hyphenChar = charStyle.hyphenChar();
 	QString hyphenText;
@@ -139,6 +145,7 @@
 	const CharStyle& charStyle = paraStyle.charStyle();
 	updateCharStyle(charStyle);
 
+	QSignalBlocker blocker(maxConsecutiveCountSpinBox);
 	maxConsecutiveCountSpinBox->setValue(paraStyle.hyphenConsecutiveLines());
 }
 




More information about the scribus-commit mailing list