r21269 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Sun May 1 14:59:50 UTC 2016
Author: jghali
Date: Sun May 1 14:59:50 2016
New Revision: 21269
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21269
Log:
#14007: When using Line editor spinbox, value grow abnormally
Modified:
trunk/Scribus/scribus/ui/dasheditor.cpp
Modified: trunk/Scribus/scribus/ui/dasheditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21269&path=/trunk/Scribus/scribus/ui/dasheditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/dasheditor.cpp (original)
+++ trunk/Scribus/scribus/ui/dasheditor.cpp Sun May 1 14:59:50 2016
@@ -31,6 +31,7 @@
#include <QPainter>
#include <QPixmap>
#include <QPolygon>
+#include <QSignalBlocker>
#include <QToolTip>
#include "scpainter.h"
@@ -279,14 +280,14 @@
if ((ActStop >= vals.count()) || (ActStop == -1))
ActStop = 0;
onlyselect = true;
- repaint();
- if (StopM.count() != 0)
+ if (DashValues.count() != 0)
{
if ((ActStop >= vals.count()) || (ActStop == -1))
- emit currStep(StopM[0] / 10.0);
- else
- emit currStep(StopM[ActStop] / 10.0);
- }
+ emit currStep(DashValues[0]);
+ else
+ emit currStep(DashValues[ActStop]);
+ }
+ update();
}
DashEditor::DashEditor(QWidget *pa) : QFrame(pa)
@@ -331,9 +332,8 @@
void DashEditor::setPos(double p)
{
- disconnect(Position, SIGNAL(valueChanged(double)), Preview, SLOT(setActStep(double)));
+ QSignalBlocker blocker(Position);
Position->setValue(p);
- connect(Position, SIGNAL(valueChanged(double)), Preview, SLOT(setActStep(double)));
}
void DashEditor::setDashValues(QVector<double> vals, double linewidth, double offset)
More information about the scribus-commit
mailing list