mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-10-31 10:37:00 -04:00 
			
		
		
		
	Dont show an error message when trying to use quick open with no book open
This commit is contained in:
		
							parent
							
								
									905e1b5e86
								
							
						
					
					
						commit
						3cb0d29170
					
				| @ -1093,6 +1093,9 @@ class Boss(QObject): | |||||||
| 
 | 
 | ||||||
|     def quick_open(self): |     def quick_open(self): | ||||||
|         c = current_container() |         c = current_container() | ||||||
|  |         if c is None: | ||||||
|  |             return error_dialog(self.gui, _('No open book'), _( | ||||||
|  |                 'No book is currently open. You must first open a book to edit.'), show=True) | ||||||
|         files = [name for name, mime in c.mime_map.iteritems() if c.exists(name) and syntax_from_mime(name, mime) is not None] |         files = [name for name, mime in c.mime_map.iteritems() if c.exists(name) and syntax_from_mime(name, mime) is not None] | ||||||
|         d = QuickOpen(files, parent=self.gui) |         d = QuickOpen(files, parent=self.gui) | ||||||
|         if d.exec_() == d.Accepted and d.selected_result is not None: |         if d.exec_() == d.Accepted and d.selected_result is not None: | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user