mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
ef4705070f
commit
2a48170fd3
3 changed files with 10 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue