Changeset bd7ded8 in subsurface


Ignore:
Timestamp:
Nov 30, 2013, 9:25:16 AM (4 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Mtest, android_test, dcDownload, foratdotde, gitMerge, gitdebug, gitpictures, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, testTomaz, testing, v4.0-branch, v4.0.3-branch, v4.2-branch, v4.4-branch, v4.5-branch
Children:
b22f1da
Parents:
ba88a33
git-author:
Thiago Macieira <thiago@…> (11/30/13 09:18:03)
git-committer:
Dirk Hohndel <dirk@…> (11/30/13 09:25:16)
Message:

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@…>
Signed-off-by: Dirk Hohndel <dirk@…>

Location:
qt-ui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • qt-ui/diveplanner.cpp

    r3fd39a7 rbd7ded8  
    771771}
    772772
     773void Ruler::eraseAll()
     774{
     775        qDeleteAll(ticks);
     776        ticks.clear();
     777        qDeleteAll(labels);
     778        labels.clear();
     779}
     780
    773781Ruler::Ruler() : orientation(Qt::Horizontal)
    774782{
     783}
     784
     785Ruler::~Ruler()
     786{
     787        eraseAll();
    775788}
    776789
     
    785798void Ruler::updateTicks()
    786799{
    787         qDeleteAll(ticks);
    788         ticks.clear();
    789         qDeleteAll(labels);
    790         labels.clear();
     800        eraseAll();
    791801
    792802        QLineF m = line();
  • qt-ui/diveplanner.h

    rc94101d rbd7ded8  
    126126public:
    127127        Ruler();
     128        ~Ruler();
    128129        void setMinimum(double minimum);
    129130        void setMaximum(double maximum);
     
    142143
    143144private:
     145        void eraseAll();
     146
    144147        Qt::Orientation orientation;
    145148        QList<QGraphicsLineItem*> ticks;
Note: See TracChangeset for help on using the changeset viewer.