diff options
-rw-r--r-- | desktop-widgets/locationinformation.cpp | 6 | ||||
-rw-r--r-- | desktop-widgets/locationinformation.h | 2 | ||||
-rw-r--r-- | qt-models/filtermodels.cpp | 4 | ||||
-rw-r--r-- | qt-models/filtermodels.h | 2 |
4 files changed, 5 insertions, 9 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 65ccfa7f0..e48c46008 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -33,8 +33,6 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo ui.diveSiteMessage->addAction(acceptAction); ui.diveSiteMessage->addAction(rejectAction); - connect(this, SIGNAL(startFilterDiveSite(uint32_t)), MultiFilterSortModel::instance(), SLOT(startFilterDiveSite(uint32_t))); - connect(this, SIGNAL(stopFilterDiveSite()), MultiFilterSortModel::instance(), SLOT(stopFilterDiveSite())); connect(ui.geoCodeButton, SIGNAL(clicked()), this, SLOT(reverseGeocode())); connect(this, SIGNAL(nameChanged(const QString &, const QString &)), LocationFilterModel::instance(), SLOT(changeName(const QString &, const QString &))); @@ -229,7 +227,7 @@ void LocationInformationWidget::initFields(dive_site *ds) updateLabels(); enableLocationButtons(dive_site_has_gps_location(ds)); QSortFilterProxyModel *m = qobject_cast<QSortFilterProxyModel *>(ui.diveSiteListView->model()); - emit startFilterDiveSite(ds->uuid); + MultiFilterSortModel::instance()->startFilterDiveSite(ds); if (m) m->invalidate(); } else { @@ -261,7 +259,7 @@ void LocationInformationWidget::resetState() ui.diveSiteMessage->setText(tr("Dive site management")); MapWidget::instance()->endGetDiveCoordinates(); MapWidget::instance()->repopulateLabels(); - emit stopFilterDiveSite(); + MultiFilterSortModel::instance()->stopFilterDiveSite(); emit endEditDiveSite(); updateLocationOnMap(); } diff --git a/desktop-widgets/locationinformation.h b/desktop-widgets/locationinformation.h index d01340b07..689422dca 100644 --- a/desktop-widgets/locationinformation.h +++ b/desktop-widgets/locationinformation.h @@ -41,8 +41,6 @@ private slots: void updateLocationOnMap(); signals: void endEditDiveSite(); - void startFilterDiveSite(uint32_t uuid); - void stopFilterDiveSite(); void nameChanged(const QString &oldName, const QString &newName); private: diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index 58d0277bd..9e9c6de60 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -684,9 +684,9 @@ void MultiFilterSortModel::clearFilter() myInvalidate(); } -void MultiFilterSortModel::startFilterDiveSite(uint32_t uuid) +void MultiFilterSortModel::startFilterDiveSite(struct dive_site *ds) { - curr_dive_site = get_dive_site_by_uuid(uuid); + curr_dive_site = ds; myInvalidate(); } diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h index 2fd5ef2b2..f962386a1 100644 --- a/qt-models/filtermodels.h +++ b/qt-models/filtermodels.h @@ -129,7 +129,7 @@ public slots: void myInvalidate(); void clearFilter(); - void startFilterDiveSite(uint32_t uuid); + void startFilterDiveSite(struct dive_site *ds); void stopFilterDiveSite(); void filterChanged(const QModelIndex &from, const QModelIndex &to, const QVector<int> &roles); |