From 8939b6a99bbcc2db335d557df802e31b8a310aec Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 9 Apr 2021 22:28:54 +0200 Subject: profile: remove enableToolbar() signal When showing the "empty-state", the profile toolbar was disabled. This was done via a "reverse" signal from the profile to the MainWindow. Instead control the toolbar in the MainWindow directly. Break out the plot-dive functionality into a member function and there test whether a dive is shown or not. The signal makes no sense in the context of mobile or printing. Signed-off-by: Berthold Stoeger --- profile-widget/profilewidget2.cpp | 2 -- profile-widget/profilewidget2.h | 1 - 2 files changed, 3 deletions(-) (limited to 'profile-widget') diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 9f6158659..b82de0d9e 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1064,7 +1064,6 @@ void ProfileWidget2::setEmptyState() setBackgroundBrush(getColor(::BACKGROUND, isGrayscale)); dataModel->clear(); currentState = EMPTY; - emit enableToolbar(false); fixBackgroundPos(); background->setVisible(true); @@ -1128,7 +1127,6 @@ void ProfileWidget2::setProfileState() /* show the same stuff that the profile shows. */ currentState = PROFILE; - emit enableToolbar(true); setBackgroundBrush(getColor(::BACKGROUND, isGrayscale)); background->setVisible(false); diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h index 1b7fcb7c8..2b7d8a88b 100644 --- a/profile-widget/profilewidget2.h +++ b/profile-widget/profilewidget2.h @@ -99,7 +99,6 @@ public: signals: void fontPrintScaleChanged(double scale); - void enableToolbar(bool enable); void editCurrentDive(); public -- cgit v1.2.3-70-g09d2