diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-05-21 14:26:00 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-22 09:06:16 +0900 |
commit | f416cdd9e8a4e294b219c24ff46a792d44a472f8 (patch) | |
tree | 41b23908af4671aff1611883cd0259a07e273dea /qt-ui/profile | |
parent | 119950b6dbc47578163fe167151e9dde5ff71427 (diff) | |
download | subsurface-f416cdd9e8a4e294b219c24ff46a792d44a472f8.tar.gz |
Source and dest are created on the constructor, no need to check for them.
The code checked if dest and source existed before trying to call an
method on them, but dest and source are created on the constructor,
and thus, the if is dummy.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/ruleritem.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/qt-ui/profile/ruleritem.cpp b/qt-ui/profile/ruleritem.cpp index f168da953..92e8f12c5 100644 --- a/qt-ui/profile/ruleritem.cpp +++ b/qt-ui/profile/ruleritem.cpp @@ -172,8 +172,6 @@ void RulerItem2::setAxis(DiveCartesianAxis *time, DiveCartesianAxis *depth) void RulerItem2::setVisible(bool visible) { QGraphicsLineItem::setVisible(visible); - if (source) - source->setVisible(visible); - if (dest) - dest->setVisible(visible); + source->setVisible(visible); + dest->setVisible(visible); } |