mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-10-31 02:27:01 -04:00 
			
		
		
		
	complete2: Prevent mouse moving in from the bottom of the list changing the scroll position of the list
This commit is contained in:
		
							parent
							
								
									4166178747
								
							
						
					
					
						commit
						c75d9b55ee
					
				| @ -115,7 +115,14 @@ class Completer(QListView):  # {{{ | ||||
|             self.relayout_needed.emit() | ||||
| 
 | ||||
|     def item_entered(self, idx): | ||||
|         self.setCurrentIndex(idx) | ||||
|         if self.visualRect(idx).top() < self.viewport().rect().bottom() - 5: | ||||
|             # Prevent any bottom item in the list that is only partially | ||||
|             # visible from triggering setCurrentIndex() | ||||
|             self.entered.disconnect() | ||||
|             try: | ||||
|                 self.setCurrentIndex(idx) | ||||
|             finally: | ||||
|                 self.entered.connect(self.item_entered) | ||||
| 
 | ||||
|     def next_match(self, previous=False): | ||||
|         c = self.currentIndex() | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user