mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	QML UI: only change connection when finding a match
If we can't find a match, just leave it unchanged. This way, if we mis-recognize a device, the user can correct the product (or even vendor) without losing the correct connection. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									2ccfce7cf0
								
							
						
					
					
						commit
						ec1b22b487
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -83,7 +83,9 @@ Kirigami.Page {
 | 
			
		|||
				model: null
 | 
			
		||||
				currentIndex: productidx
 | 
			
		||||
				onCurrentTextChanged: {
 | 
			
		||||
					comboConnection.currentIndex = downloadThread.data().getMatchingAddress(comboVendor.currentText, currentText)
 | 
			
		||||
					var newIdx = downloadThread.data().getMatchingAddress(comboVendor.currentText, currentText)
 | 
			
		||||
					if (newIdx != -1)
 | 
			
		||||
						comboConnection.currentIndex = newIdx
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				onModelChanged: {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue