summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/mainwindow.cpp4
-rw-r--r--desktop-widgets/mainwindow.h3
2 files changed, 3 insertions, 4 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 2fd7232a6..d5942a344 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -53,7 +53,6 @@
#include "desktop-widgets/tab-widgets/maintab.h"
#include "desktop-widgets/updatemanager.h"
#include "desktop-widgets/usersurvey.h"
-#include "desktop-widgets/filterwidget2.h"
#include "desktop-widgets/simplewidgets.h"
#include "profile-widget/profilewidget2.h"
@@ -146,7 +145,6 @@ MainWindow::MainWindow() : QMainWindow(),
divePlannerSettingsWidget = new PlannerSettingsWidget(this);
divePlannerWidget = new DivePlannerWidget(this);
plannerDetails = new PlannerDetails(this);
- auto *filterWidget2 = new FilterWidget2();
// what is a sane order for those icons? we should have the ones the user is
// most likely to want towards the top so they are always visible
@@ -195,7 +193,7 @@ MainWindow::MainWindow() : QMainWindow(),
registerApplicationState("PlanDive", divePlannerWidget, profileContainer, divePlannerSettingsWidget, plannerDetails );
registerApplicationState("EditPlannedDive", divePlannerWidget, profileContainer, diveList, mapWidget );
registerApplicationState("EditDiveSite", diveSiteEdit, profileContainer, diveList, mapWidget);
- registerApplicationState("FilterDive", mainTab, profileContainer, diveList, filterWidget2);
+ registerApplicationState("FilterDive", mainTab, profileContainer, diveList, &filterWidget2);
setStateProperties("Default", enabledList, enabledList, enabledList,enabledList);
setStateProperties("AddDive", enabledList, enabledList, enabledList,enabledList);
diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h
index a18738de4..d78fc293e 100644
--- a/desktop-widgets/mainwindow.h
+++ b/desktop-widgets/mainwindow.h
@@ -17,6 +17,7 @@
#include "ui_mainwindow.h"
#include "ui_plannerDetails.h"
#include "desktop-widgets/notificationwidget.h"
+#include "desktop-widgets/filterwidget2.h"
#include "core/gpslocation.h"
#include "core/dive.h"
@@ -36,7 +37,6 @@ class ProfileWidget2;
class PlannerDetails;
class PlannerSettingsWidget;
class LocationInformationWidget;
-class FilterWidget2;
typedef std::pair<QByteArray, QVariant> WidgetProperty;
typedef QVector<WidgetProperty> PropertyList;
@@ -186,6 +186,7 @@ slots:
private:
Ui::MainWindow ui;
+ FilterWidget2 filterWidget2;
QAction *actionNextDive;
QAction *actionPreviousDive;
QAction *undoAction;