From e28f171731122e6ce1c3d9b1173be5d62dd34e6b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 5 Nov 2015 12:51:05 -0800 Subject: Untangle Profile from MainWindow: refresh display Instead of directly calling into the MainWindow, redirect this via a signal so Subsurface mobile can hook it up as needed. Signed-off-by: Dirk Hohndel --- profile-widget/profilewidget2.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'profile-widget/profilewidget2.cpp') diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 0b126e6b6..310652b75 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1351,7 +1351,8 @@ void ProfileWidget2::deleteCurrentDC() mark_divelist_changed(true); // we need to force it since it's likely the same dive and same dc_number - but that's a different dive computer now MainWindow::instance()->graphics()->plotDive(0, true); - MainWindow::instance()->refreshDisplay(); + + emit refreshDisplay(true); } void ProfileWidget2::makeFirstDC() @@ -1363,7 +1364,7 @@ void ProfileWidget2::makeFirstDC() // dive list may change). // As a side benefit, this returns focus to the dive list. dc_number = 0; - MainWindow::instance()->refreshDisplay(); + emit refreshDisplay(true); } void ProfileWidget2::hideEvents() -- cgit v1.2.3-70-g09d2