mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
planner: remove getRebreatherMode() from planner-model
There was this completely weird loop that the planner-widget would call the planner-model to get the current rebreather mode, which would then access the dive in the planner widget. Just keep those things in the planner widgets. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1fb9d6236b
commit
e70e3082c9
4 changed files with 17 additions and 16 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#ifndef DIVEPLANNER_H
|
||||
#define DIVEPLANNER_H
|
||||
|
||||
#include "core/divemode.h"
|
||||
#include "core/owning_ptrs.h"
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
|
@ -43,13 +44,13 @@ private:
|
|||
class PlannerSettingsWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PlannerSettingsWidget(QWidget *parent = 0);
|
||||
explicit PlannerSettingsWidget(PlannerWidgets *parent);
|
||||
~PlannerSettingsWidget();
|
||||
public
|
||||
slots:
|
||||
void settingsChanged();
|
||||
void setBackgasBreaks(bool dobreaks);
|
||||
void disableDecoElements(int mode);
|
||||
void disableDecoElements(int mode, divemode_t rebreathermode);
|
||||
void disableBackgasBreaks(bool enabled);
|
||||
void setDiveMode(int mode);
|
||||
void setBailoutVisibility(int mode);
|
||||
|
|
@ -86,6 +87,7 @@ public:
|
|||
void prepareReplanDive(const dive *d); // Make a copy of the dive to be replanned
|
||||
void replanDive(int currentDC);
|
||||
struct dive *getDive() const;
|
||||
divemode_t getRebreatherMode() const;
|
||||
public
|
||||
slots:
|
||||
void printDecoPlan();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue