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>
This commit is contained in:
Tomaz Canabrava 2014-05-21 14:26:00 -03:00 committed by Dirk Hohndel
parent 119950b6db
commit f416cdd9e8

View file

@ -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);
}