r17053 by fschmid - Fixed misbehaviour of the custom dash editor, always selecting the first dash after a change.

scribus-commit scribus-commit at lists.scribus.net
Thu Dec 1 20:46:35 UTC 2011


Author: fschmid
Date: Thu Dec  1 20:46:34 2011
New Revision: 17053

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17053
Log:
Fixed misbehaviour of the custom dash editor, always selecting the first dash after a change.

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

Modified: trunk/Scribus/scribus/ui/dasheditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17053&path=/trunk/Scribus/scribus/ui/dasheditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/dasheditor.cpp (original)
+++ trunk/Scribus/scribus/ui/dasheditor.cpp Thu Dec  1 20:46:34 2011
@@ -273,11 +273,17 @@
 void DashPreview::setDashValues(QVector<double> vals)
 {
 	DashValues = vals;
-	ActStop = 0;
+	if ((ActStop >= vals.count()) || (ActStop == -1))
+		ActStop = 0;
 	onlyselect = true;
 	repaint();
 	if (StopM.count() != 0)
-		emit currStep(StopM[0] / 10.0);
+	{
+		if ((ActStop >= vals.count()) || (ActStop == -1))
+			emit currStep(StopM[0] / 10.0);
+		else
+			emit currStep(StopM[ActStop] / 10.0);
+	}
 }
 
 DashEditor::DashEditor(QWidget *pa) : QFrame(pa)




More information about the scribus-commit mailing list