summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp2
-rw-r--r--qt-ui/profile/profilewidget2.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index 3ab4a4e26..043f193ea 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -51,7 +51,7 @@ void DiveCartesianAxis::updateTicks()
double currValue = min;
// Remove the uneeded Ticks / Texts.
- if (ticks.size() > steps) {
+ if (!ticks.isEmpty() && ticks.size() > steps) {
while (ticks.size() > steps) {
DiveLineItem *removedLine = ticks.takeLast();
removedLine->animatedHide();
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index d3d4ec9da..3970e6f3a 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -277,6 +277,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
* shown.
*/
struct plot_info pInfo = calculate_max_limits_new(d, currentdc);
+ create_plot_info_new(d, currentdc, &pInfo);
int maxtime = get_maxtime(&pInfo);
int maxdepth = get_maxdepth(&pInfo);