mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: set axis in constructor of TankItem
There is no point in a separate set-axis function if we never change the axis anyway. Make the axis a const-reference to show that it can never be changed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
47d673bda3
commit
7da5719cab
3 changed files with 7 additions and 15 deletions
|
@ -150,7 +150,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent),
|
|||
mouseFollowerHorizontal(new DiveLineItem()),
|
||||
rulerItem(new RulerItem2()),
|
||||
#endif
|
||||
tankItem(new TankItem()),
|
||||
tankItem(new TankItem(*timeAxis)),
|
||||
shouldCalculateMaxTime(true),
|
||||
shouldCalculateMaxDepth(true),
|
||||
fontPrintScale(1.0)
|
||||
|
@ -318,8 +318,6 @@ void ProfileWidget2::setupItemOnScene()
|
|||
diveComputerText->setAlignment(Qt::AlignRight | Qt::AlignTop);
|
||||
diveComputerText->setBrush(getColor(TIME_TEXT, isGrayscale));
|
||||
|
||||
tankItem->setHorizontalAxis(timeAxis);
|
||||
|
||||
#ifndef SUBSURFACE_MOBILE
|
||||
rulerItem->setAxis(timeAxis, profileYAxis);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue