mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Untangle Profile from MainWindow: update main tab via signal
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4ec5ce4c7a
commit
2b9316e16a
3 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue