mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Mobile/filtering: implement the filter update through a thread
It's important to disconnect the model from the ListView, otherwise the update in a different thread will fail. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									84822ebd2f
								
							
						
					
					
						commit
						cf3fcc53b6
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		|  | @ -411,8 +411,7 @@ Kirigami.ScrollablePage { | |||
| 					text: "" | ||||
| 					placeholderText: "Full text search" | ||||
| 					onAccepted: { | ||||
| 						rootItem.filterPattern = text | ||||
| 						diveModel.setFilter(text) | ||||
| 						manager.setFilter(text) | ||||
| 						console.log("back from setFilter") | ||||
| 					} | ||||
| 					onEnabledChanged: { | ||||
|  | @ -451,6 +450,10 @@ Kirigami.ScrollablePage { | |||
| 		section.criteria: ViewSection.FullString | ||||
| 		section.delegate: tripHeading | ||||
| 		section.labelPositioning: ViewSection.CurrentLabelAtStart | ViewSection.InlineLabels | ||||
| 		onModelChanged: { | ||||
| 			numShownText = diveModel.shown() | ||||
| 			console.log("update number shown to " + numShownText) | ||||
| 		} | ||||
| 		Connections { | ||||
| 			target: detailsWindow | ||||
| 			onCurrentIndexChanged: diveListView.currentIndex = detailsWindow.currentIndex | ||||
|  |  | |||
|  | @ -64,10 +64,12 @@ Kirigami.ApplicationWindow { | |||
| 
 | ||||
| 	function showBusy() { | ||||
| 		busy.running = true | ||||
| 		diveList.diveListModel = null | ||||
| 	} | ||||
| 
 | ||||
| 	function hideBusy() { | ||||
| 		busy.running = false | ||||
| 		diveList.diveListModel = diveModel | ||||
| 	} | ||||
| 
 | ||||
| 	function returnTopPage() { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue