From f416cdd9e8a4e294b219c24ff46a792d44a472f8 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 21 May 2014 14:26:00 -0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/ruleritem.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'qt-ui/profile') 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); } -- cgit v1.2.3-70-g09d2