Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/qml/filters/MMFiltersPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -131,7 +131,6 @@ MMComponents.MMDrawer {

layerId: model.layerId
layerName: model.layerName
filterController: __activeProject.filterController
vectorLayer: model.layer
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/qml/layers/MMFeaturesListPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -79,8 +79,8 @@ MMComponents.MMPage {
anchors.verticalCenter: parent.verticalCenter

onClicked: {
globalFilterController.clearAllFilters()
globalFilterController.applyFiltersToAllLayers()
__activeProject.filterController.clearAllFilters()
__activeProject.filterController.applyFiltersToAllLayers()
featuresModel.reloadFeatures()
}
}
Expand Down
9 changes: 0 additions & 9 deletions app/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -524,8 +517,6 @@ ApplicationWindow {

active: false
sourceComponent: MMFiltersPanel {
filterController: globalFilterController

onClosed: {
filtersDrawerLoader.active = false
stateManager.state = "map"
Expand Down
9 changes: 3 additions & 6 deletions app/qml/map/MMMapController.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
Loading