diff --git a/app/qml/filters/MMFiltersPanel.qml b/app/qml/filters/MMFiltersPanel.qml index 3532398e9..bcb81327d 100644 --- a/app/qml/filters/MMFiltersPanel.qml +++ b/app/qml/filters/MMFiltersPanel.qml @@ -79,8 +79,8 @@ MMComponents.MMDrawer { } onClicked: { - __activeProject.filterController.clearAllFilters() - filterController.applyFiltersToAllLayers() + __activeProject.filterController.clearAllFilters() + __activeProject.filterController.applyFiltersToAllLayers() root.filtersApplied = true // Refresh the UI to clear input fields internal.refreshLayers() @@ -131,7 +131,6 @@ MMComponents.MMDrawer { layerId: model.layerId layerName: model.layerName - filterController: __activeProject.filterController vectorLayer: model.layer } } diff --git a/app/qml/layers/MMFeaturesListPage.qml b/app/qml/layers/MMFeaturesListPage.qml index e5232c7d7..5a13ce34a 100644 --- a/app/qml/layers/MMFeaturesListPage.qml +++ b/app/qml/layers/MMFeaturesListPage.qml @@ -43,7 +43,7 @@ MMComponents.MMPage { height: filterRow.implicitHeight + 2 * __style.margin8 radius: __style.radius12 - visible: root.selectedLayer && globalFilterController.filteredLayerIds.indexOf(root.selectedLayer.id) >= 0 + visible: root.selectedLayer && __activeProject.filterController.filteredLayerIds.indexOf(root.selectedLayer.id) >= 0 color: __style.sandColor border.width: 1 * __dp @@ -79,8 +79,8 @@ MMComponents.MMPage { anchors.verticalCenter: parent.verticalCenter onClicked: { - globalFilterController.clearAllFilters() - globalFilterController.applyFiltersToAllLayers() + __activeProject.filterController.clearAllFilters() + __activeProject.filterController.applyFiltersToAllLayers() featuresModel.reloadFeatures() } } diff --git a/app/qml/main.qml b/app/qml/main.qml index 323bf4d75..b09da1575 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -32,11 +32,6 @@ import "./filters" ApplicationWindow { id: window - // Global filter controller for managing map filters - MM.FilterController { - id: globalFilterController - } - visible: true x: __appwindowx y: __appwindowy @@ -155,8 +150,6 @@ ApplicationWindow { height: window.height - mapToolbar.height width: window.width - filterController: globalFilterController - mapExtentOffset: { // offset depends on what panels are visible. // we need to subtract mapToolbar's height from any visible panel @@ -524,8 +517,6 @@ ApplicationWindow { active: false sourceComponent: MMFiltersPanel { - filterController: globalFilterController - onClosed: { filtersDrawerLoader.active = false stateManager.state = "map" diff --git a/app/qml/map/MMMapController.qml b/app/qml/map/MMMapController.qml index ef37784e5..e512bb7d2 100644 --- a/app/qml/map/MMMapController.qml +++ b/app/qml/map/MMMapController.qml @@ -46,9 +46,6 @@ Item { property MM.MapSketchingController sketchingController: sketchesLoader.item?.controller ?? null - // Filter controller for managing feature filters - property var filterController: null - signal featureIdentified( var pair ) signal featuresIdentified( var pairs ) signal nothingIdentified() @@ -595,9 +592,9 @@ Item { MMMapButton { id: filterIndicatorButton - visible: root.state === "view" && root.filterController && (root.filterController.hasActiveFilters || AppSettings.alwaysShowFilterButton) - iconSource: root.filterController && root.filterController.hasActiveFilters ? __style.filterFilledIcon : __style.filterIcon - bgndColor: root.filterController && root.filterController.hasActiveFilters ? __style.sandColor : __style.polarColor + visible: root.state === "view" && __activeProject.filterController && (__activeProject.filterController.hasActiveFilters || AppSettings.alwaysShowFilterButton) + iconSource: __activeProject.filterController && __activeProject.filterController.hasActiveFilters ? __style.filterFilledIcon : __style.filterIcon + bgndColor: __activeProject.filterController && __activeProject.filterController.hasActiveFilters ? __style.sandColor : __style.polarColor anchors { left: parent.left