aboutsummaryrefslogtreecommitdiff
path: root/stfgraphicsitem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'stfgraphicsitem.cc')
-rw-r--r--stfgraphicsitem.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/stfgraphicsitem.cc b/stfgraphicsitem.cc
index 75c9dfa..7ba173f 100644
--- a/stfgraphicsitem.cc
+++ b/stfgraphicsitem.cc
@@ -28,7 +28,7 @@ class StfToGraphicsPathItems : public StfReader::StrokeHandler {
QGraphicsItem *parent;
PaperReplay::SessionList replays;
PaperReplay::Session replay;
- qint64 startTime, lastTime;
+ qint64 startTime;
QPainterPath path;
QRectF bound;
@@ -37,9 +37,6 @@ public:
: parent(parent), replays(replays), path(), bound(0.0, 0.0, 1.0, 1.0) {
}
- ~StfToGraphicsPathItems() {
- }
-
bool startStroke(const QPoint& p, int force, qint64 time) {
Q_UNUSED(force);
QList<PaperReplay::Session> sessions = replays.sessionsDuringTime(time);
@@ -49,7 +46,6 @@ public:
replay = PaperReplay::Session();
}
startTime = time;
- lastTime = time;
path = QPainterPath(QPointF(p));
return true;
}
@@ -57,14 +53,13 @@ public:
bool strokePoint(const QPoint& p, int force, qint64 time) {
Q_UNUSED(force);
Q_UNUSED(time);
- lastTime = time;
path.lineTo(QPointF(p));
return true;
}
- bool endStroke() {
+ bool endStroke(qint64 time) {
bound |= path.boundingRect();
- new StfStrokeItem(path, replay, startTime, lastTime, parent);
+ new StfStrokeItem(path, replay, startTime, time, parent);
/* Parent will take the child down with him when deleted. */
return true;
}