mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: no doClearPictures argument for ProfileWidget2::plotDive
All callers were passing the default value (false). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
01af4bcd00
commit
685b7cb2a8
2 changed files with 6 additions and 12 deletions
|
@ -164,7 +164,7 @@ void ProfileWidget2::setupItemOnScene()
|
||||||
|
|
||||||
void ProfileWidget2::replot()
|
void ProfileWidget2::replot()
|
||||||
{
|
{
|
||||||
plotDive(d, dc, false);
|
plotDive(d, dc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileWidget2::setupSceneAndFlags()
|
void ProfileWidget2::setupSceneAndFlags()
|
||||||
|
@ -185,7 +185,7 @@ void ProfileWidget2::resetZoom()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Currently just one dive, but the plan is to enable All of the selected dives.
|
// Currently just one dive, but the plan is to enable All of the selected dives.
|
||||||
void ProfileWidget2::plotDive(const struct dive *dIn, int dcIn, bool doClearPictures, bool instant)
|
void ProfileWidget2::plotDive(const struct dive *dIn, int dcIn, bool instant)
|
||||||
{
|
{
|
||||||
// If there was no previously displayed dive, turn off animations
|
// If there was no previously displayed dive, turn off animations
|
||||||
if (!d)
|
if (!d)
|
||||||
|
@ -200,9 +200,6 @@ void ProfileWidget2::plotDive(const struct dive *dIn, int dcIn, bool doClearPict
|
||||||
|
|
||||||
QElapsedTimer measureDuration; // let's measure how long this takes us (maybe we'll turn of TTL calculation later
|
QElapsedTimer measureDuration; // let's measure how long this takes us (maybe we'll turn of TTL calculation later
|
||||||
measureDuration.start();
|
measureDuration.start();
|
||||||
#ifdef SUBSURFACE_MOBILE
|
|
||||||
Q_UNUSED(doClearPictures);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DivePlannerPointsModel *model = currentState == EDIT || currentState == PLAN ? plannerModel : nullptr;
|
DivePlannerPointsModel *model = currentState == EDIT || currentState == PLAN ? plannerModel : nullptr;
|
||||||
bool inPlanner = currentState == PLAN;
|
bool inPlanner = currentState == PLAN;
|
||||||
|
@ -222,10 +219,7 @@ void ProfileWidget2::plotDive(const struct dive *dIn, int dcIn, bool doClearPict
|
||||||
repositionDiveHandlers();
|
repositionDiveHandlers();
|
||||||
plannerModel->deleteTemporaryPlan();
|
plannerModel->deleteTemporaryPlan();
|
||||||
}
|
}
|
||||||
if (doClearPictures)
|
plotPicturesInternal(d, instant);
|
||||||
clearPictures();
|
|
||||||
else
|
|
||||||
plotPicturesInternal(d, instant);
|
|
||||||
|
|
||||||
toolTipItem->refresh(d, mapToScene(mapFromGlobal(QCursor::pos())), currentState == PLAN);
|
toolTipItem->refresh(d, mapToScene(mapFromGlobal(QCursor::pos())), currentState == PLAN);
|
||||||
#endif
|
#endif
|
||||||
|
@ -265,7 +259,7 @@ void ProfileWidget2::resizeEvent(QResizeEvent *event)
|
||||||
{
|
{
|
||||||
QGraphicsView::resizeEvent(event);
|
QGraphicsView::resizeEvent(event);
|
||||||
profileScene->resize(viewport()->size());
|
profileScene->resize(viewport()->size());
|
||||||
plotDive(d, dc, false, true); // disable animation on resize events
|
plotDive(d, dc, true); // disable animation on resize events
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SUBSURFACE_MOBILE
|
#ifndef SUBSURFACE_MOBILE
|
||||||
|
@ -352,7 +346,7 @@ void ProfileWidget2::mouseMoveEvent(QMouseEvent *event)
|
||||||
|
|
||||||
if (zoomLevel != 0) {
|
if (zoomLevel != 0) {
|
||||||
zoomedPosition = pos.x() / profileScene->width();
|
zoomedPosition = pos.x() / profileScene->width();
|
||||||
plotDive(d, dc, false, true); // TODO: animations don't work when scrolling
|
plotDive(d, dc, true); // TODO: animations don't work when scrolling
|
||||||
}
|
}
|
||||||
|
|
||||||
double vValue = profileScene->profileYAxis->valueAt(pos);
|
double vValue = profileScene->profileYAxis->valueAt(pos);
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
ProfileWidget2(DivePlannerPointsModel *plannerModel, double dpr, QWidget *parent = 0);
|
ProfileWidget2(DivePlannerPointsModel *plannerModel, double dpr, QWidget *parent = 0);
|
||||||
~ProfileWidget2();
|
~ProfileWidget2();
|
||||||
void resetZoom();
|
void resetZoom();
|
||||||
void plotDive(const struct dive *d, int dc, bool clearPictures = false, bool instant = false);
|
void plotDive(const struct dive *d, int dc, bool instant = false);
|
||||||
void setProfileState(const struct dive *d, int dc);
|
void setProfileState(const struct dive *d, int dc);
|
||||||
void setPlanState(const struct dive *d, int dc);
|
void setPlanState(const struct dive *d, int dc);
|
||||||
void setEditState(const struct dive *d, int dc);
|
void setEditState(const struct dive *d, int dc);
|
||||||
|
|
Loading…
Add table
Reference in a new issue