Code Cleanup: Move the Hide/Show ruler to an internal method

By moving the Hide/Show of the ruler to an internal method, we gain a bit
of codecleanuperism by removing a lot of unnecessary calls to their dest
and source drag-handlers.

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 12:18:05 -03:00 committed by Dirk Hohndel
parent ef4705070f
commit 2a48170fd3
3 changed files with 10 additions and 11 deletions

View file

@ -157,3 +157,12 @@ void RulerItem2::setAxis(DiveCartesianAxis *time, DiveCartesianAxis *depth)
source->timeAxis = time;
recalculate();
}
void RulerItem2::setVisible(bool visible)
{
QGraphicsLineItem::setVisible(visible);
if (source)
source->setVisible(visible);
if (dest)
dest->setVisible(visible);
}