r20236 by jghali - #13197: in file > new, "chaining" should make all values equal

scribus-commit scribus-commit at lists.scribus.net
Tue Jul 7 23:16:23 UTC 2015


Author: jghali
Date: Tue Jul  7 23:16:23 2015
New Revision: 20236

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20236
Log:
#13197: in file > new, "chaining" should make all values equal

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

Modified: trunk/Scribus/scribus/ui/marginwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20236&path=/trunk/Scribus/scribus/ui/marginwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/marginwidget.cpp (original)
+++ trunk/Scribus/scribus/ui/marginwidget.cpp Tue Jul  7 23:16:23 2015
@@ -173,12 +173,23 @@
 	disconnect(BleedRight, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
 	disconnect(BleedTop, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
 	disconnect(BleedBottom, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
+
+	if (BleedLeft->hasFocus())
+		BleedLeft->clearFocus();
+	if (BleedRight->hasFocus())
+		BleedRight->clearFocus();
+	if (BleedTop->hasFocus())
+		BleedTop->clearFocus();
+	if (BleedBottom->hasFocus())
+		BleedBottom->clearFocus();
+
 	if (linkBleeds->isChecked())
 	{
 		BleedTop->setValue(BleedLeft->value());
 		BleedBottom->setValue(BleedLeft->value());
 		BleedRight->setValue(BleedLeft->value());
 	}
+
 	connect(BleedLeft, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
 	connect(BleedRight, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
 	connect(BleedTop, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
@@ -556,6 +567,16 @@
 	disconnect(bottomR, SIGNAL(valueChanged(double)), this, SLOT(setBottom()));
 	disconnect(leftR, SIGNAL(valueChanged(double)), this, SLOT(setLeft()));
 	disconnect(rightR, SIGNAL(valueChanged(double)), this, SLOT(setRight()));
+
+	if (leftR->hasFocus())
+		leftR->clearFocus();
+	if (rightR->hasFocus())
+		rightR->clearFocus();
+	if (topR->hasFocus())
+		topR->clearFocus();
+	if (bottomR->hasFocus())
+		bottomR->clearFocus();
+
 	if (linkMargins->isChecked())
 	{
 		bottomR->setValue(leftR->value());
@@ -563,7 +584,8 @@
 		rightR->setValue(leftR->value());
 		double newVal=leftR->value() / m_unitRatio;
 		marginData.set(newVal, newVal, newVal, newVal);
-	}	
+	}
+
 	connect(topR, SIGNAL(valueChanged(double)), this, SLOT(setTop()));
 	connect(bottomR, SIGNAL(valueChanged(double)), this, SLOT(setBottom()));
 	connect(leftR, SIGNAL(valueChanged(double)), this, SLOT(setLeft()));




More information about the scribus-commit mailing list