Delete the graphics items for the ticks and labels in the ruler

Ruler::updateTicks() was creating them, but nothing deleted them.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Thiago Macieira 2013-11-30 09:18:03 -08:00 committed by Dirk Hohndel
parent ba88a3358d
commit bd7ded8894
2 changed files with 17 additions and 4 deletions

View file

@ -125,6 +125,7 @@ public slots:
class Ruler : public QGraphicsLineItem{
public:
Ruler();
~Ruler();
void setMinimum(double minimum);
void setMaximum(double maximum);
void setTickInterval(double interval);
@ -141,6 +142,8 @@ public:
int unitSystem;
private:
void eraseAll();
Qt::Orientation orientation;
QList<QGraphicsLineItem*> ticks;
QList<QGraphicsSimpleTextItem*> labels;