mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 05:43:24 +00:00
cleanup: remove parameter to ProfleWidget2::replot()
Firstly, the parameter appears conceptually wrong, as replot suggests that the currently shown dive is replot. Secondly, the only caller that passed a parameter was passing in current_dive, which is just what happens if one doesn't pass a parameter. Therefore, change that caller (call plotDive directly) and remove the parameter. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8f8457ebe4
commit
d520ac2286
3 changed files with 4 additions and 4 deletions
|
@ -783,7 +783,7 @@ void MainWindow::refreshProfile()
|
||||||
{
|
{
|
||||||
showProfile();
|
showProfile();
|
||||||
configureToolbar();
|
configureToolbar();
|
||||||
graphics->replot(current_dive);
|
graphics->plotDive(current_dive, true);
|
||||||
DivePictureModel::instance()->updateDivePictures();
|
DivePictureModel::instance()->updateDivePictures();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -379,10 +379,10 @@ void ProfileWidget2::setupItemOnScene()
|
||||||
gasYAxis->setZValue(timeAxis->zValue() + 1);
|
gasYAxis->setZValue(timeAxis->zValue() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileWidget2::replot(struct dive *d)
|
void ProfileWidget2::replot()
|
||||||
{
|
{
|
||||||
dataModel->clear();
|
dataModel->clear();
|
||||||
plotDive(d, true, false);
|
plotDive(nullptr, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileWidget2::createPPGas(PartialPressureGasItem *item, int verticalColumn, color_index_t color, color_index_t colorAlert,
|
void ProfileWidget2::createPPGas(PartialPressureGasItem *item, int verticalColumn, color_index_t color, color_index_t colorAlert,
|
||||||
|
|
|
@ -108,7 +108,7 @@ slots: // Necessary to call from QAction's signals.
|
||||||
void actionRequestedReplot(bool triggered);
|
void actionRequestedReplot(bool triggered);
|
||||||
void setEmptyState();
|
void setEmptyState();
|
||||||
void setProfileState();
|
void setProfileState();
|
||||||
void replot(dive *d = 0);
|
void replot();
|
||||||
#ifndef SUBSURFACE_MOBILE
|
#ifndef SUBSURFACE_MOBILE
|
||||||
void plotPictures();
|
void plotPictures();
|
||||||
void removePictures(const QVector<QString> &fileUrls);
|
void removePictures(const QVector<QString> &fileUrls);
|
||||||
|
|
Loading…
Add table
Reference in a new issue