summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profile-widget/profilewidget2.cpp2
-rw-r--r--profile-widget/profilewidget2.h1
-rw-r--r--subsurface-desktop-main.cpp2
3 files changed, 4 insertions, 1 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index d7da0b7e3..c72f2e95b 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -1476,7 +1476,7 @@ void ProfileWidget2::changeGas()
// FIXME - this no longer gets written to the dive list - so we need to enableEdition() here
- MainWindow::instance()->information()->updateDiveInfo();
+ emit updateDiveInfo(false);
mark_divelist_changed(true);
replot();
}
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h
index 5fc6e8d4b..f5977eb22 100644
--- a/profile-widget/profilewidget2.h
+++ b/profile-widget/profilewidget2.h
@@ -93,6 +93,7 @@ signals:
void enableShortcuts();
void disableShortcuts(bool paste);
void refreshDisplay(bool recreateDivelist);
+ void updateDiveInfo(bool clear);
public
slots: // Necessary to call from QAction's signals.
diff --git a/subsurface-desktop-main.cpp b/subsurface-desktop-main.cpp
index fed774303..d5caf64d3 100644
--- a/subsurface-desktop-main.cpp
+++ b/subsurface-desktop-main.cpp
@@ -9,6 +9,7 @@
#include "qt-gui.h"
#include "subsurfacestartup.h"
#include "desktop-widgets/mainwindow.h"
+#include "desktop-widgets/maintab.h"
#include "profile-widget/profilewidget2.h"
#include "desktop-widgets/diveplanner.h"
#include "subsurface-core/color.h"
@@ -91,6 +92,7 @@ int main(int argc, char **argv)
QObject::connect(m->graphics(), &ProfileWidget2::disableShortcuts, m, &MainWindow::disableShortcuts, Qt::AutoConnection);
QObject::connect(m->graphics(), &ProfileWidget2::enableShortcuts, m, &MainWindow::enableShortcuts, Qt::AutoConnection);
QObject::connect(m->graphics(), &ProfileWidget2::refreshDisplay, m, &MainWindow::refreshDisplay, Qt::AutoConnection);
+ QObject::connect(m->graphics(), &ProfileWidget2::updateDiveInfo, m->information(), &MainTab::updateDiveInfo, Qt::AutoConnection);
if (verbose > 0)
print_files();
if (!quit)