mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
profile: explicitly reset zoomLevel when plotting a new dive
Currently, the zoomLevel is reset for every plotDive() call, because the zooming is done via the QGraphicsScene. However, this does not work well (e.g. axes are likewise zoomed) and in the future a change of the zoom level will cause a replot. Thus, remove the zoom-reset in plotDive() and do it explicitly when switching dives. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7051bee7e1
commit
7d3e246680
2 changed files with 1 additions and 3 deletions
|
@ -199,6 +199,7 @@ void ProfileWidget::plotCurrentDive()
|
|||
ui.profTogglePicture->setDisabled(false);
|
||||
ui.profHR->setDisabled(false);
|
||||
view->setProfileState(current_dive, dc_number);
|
||||
view->resetZoom(); // when switching dive, reset the zoomLevel
|
||||
view->plotDive(current_dive, dc_number);
|
||||
} else {
|
||||
view->clear();
|
||||
|
|
|
@ -207,9 +207,6 @@ void ProfileWidget2::plotDive(const struct dive *dIn, int dcIn, bool doClearPict
|
|||
Q_UNUSED(doClearPictures);
|
||||
#endif
|
||||
|
||||
// restore default zoom level
|
||||
resetZoom();
|
||||
|
||||
DivePlannerPointsModel *model = currentState == EDIT || currentState == PLAN ? plannerModel : nullptr;
|
||||
bool inPlanner = currentState == PLAN;
|
||||
|
||||
|
|
Loading…
Reference in a new issue