From 837ab6c90b7952095c0dadf2de18db883b0f5ecf Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 29 Mar 2019 18:29:08 +0100 Subject: Desktop: read tab-items from current_dive, not displayed_dive The whole edit logic moved from displayed_dive to current_dive and it became more and more tedious to keep these in sync. Therefore, simply always display current_dive. The only exceptions are the equipment tab and the planner, as these are not yet integrated in the undo system. Once this is done, displayed_dive can be removed. Moreover, remove the clear parameter from updateDiveInfo(). Instead simply clear of there is no current_dive set. Signed-off-by: Berthold Stoeger --- profile-widget/profilewidget2.cpp | 4 ++-- profile-widget/profilewidget2.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'profile-widget') diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 236afb850..f9655127e 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1696,7 +1696,7 @@ void ProfileWidget2::splitDive() duration_t time; time.seconds = lrint(timeAxis->valueAt(scenePos)); Command::splitDives(d, time); - emit updateDiveInfo(false); + emit updateDiveInfo(); #endif } @@ -1742,7 +1742,7 @@ void ProfileWidget2::changeGas() // FIXME - this no longer gets written to the dive list - so we need to enableEdition() here - emit updateDiveInfo(false); + emit updateDiveInfo(); mark_divelist_changed(true); replot(); } diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h index 4cf69efa6..fbc43c623 100644 --- a/profile-widget/profilewidget2.h +++ b/profile-widget/profilewidget2.h @@ -97,7 +97,7 @@ signals: void enableShortcuts(); void disableShortcuts(bool paste); void refreshDisplay(bool recreateDivelist); - void updateDiveInfo(bool clear); + void updateDiveInfo(); void editCurrentDive(); void dateTimeChangedItems(); -- cgit v1.2.3-70-g09d2