From a537894553698880f09957fe9b423b280d5df444 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 12 Apr 2020 12:05:21 +0200 Subject: profile: remove ProfileWidget2::replotEnabled The last setter was removed in the previous commit. Let's remove this complexity. Signed-off-by: Berthold Stoeger --- profile-widget/profilewidget2.cpp | 9 --------- profile-widget/profilewidget2.h | 2 -- 2 files changed, 11 deletions(-) (limited to 'profile-widget') diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 8fbd00b49..3a8ab4d54 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -376,14 +376,10 @@ void ProfileWidget2::setupItemOnScene() timeAxis->setLinesVisible(true); profileYAxis->setLinesVisible(true); gasYAxis->setZValue(timeAxis->zValue() + 1); - - replotEnabled = true; } void ProfileWidget2::replot(struct dive *d) { - if (!replotEnabled) - return; dataModel->clear(); plotDive(d, true, false); } @@ -1402,11 +1398,6 @@ struct int ProfileWidget2::getEntryFromPos(QPointF pos) } #endif -void ProfileWidget2::setReplot(bool state) -{ - replotEnabled = state; -} - #ifndef SUBSURFACE_MOBILE void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event) { diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h index 4f60bf885..43a7f51b6 100644 --- a/profile-widget/profilewidget2.h +++ b/profile-widget/profilewidget2.h @@ -108,7 +108,6 @@ slots: // Necessary to call from QAction's signals. void actionRequestedReplot(bool triggered); void setEmptyState(); void setProfileState(); - void setReplot(bool state); void replot(dive *d = 0); #ifndef SUBSURFACE_MOBILE void plotPictures(); @@ -185,7 +184,6 @@ private: ToolTipItem *toolTipItem; #endif bool isPlotZoomed; - bool replotEnabled; // All those here should probably be merged into one structure, // So it's esyer to replicate for more dives later. // In the meantime, keep it here. -- cgit v1.2.3-70-g09d2