mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle check items being activated that are not editable
This commit is contained in:
parent
79b13973a1
commit
3b7c0e9ac6
@ -690,9 +690,8 @@ class Boss(QObject):
|
|||||||
editor = editors[name]
|
editor = editors[name]
|
||||||
self.gui.central.show_editor(editor)
|
self.gui.central.show_editor(editor)
|
||||||
else:
|
else:
|
||||||
syntax = syntax_from_mime(name, current_container().mime_map[name])
|
editor = self.edit_file_requested(name, None, current_container().mime_map[name])
|
||||||
editor = self.edit_file(name, syntax)
|
if getattr(editor, 'has_line_numbers', False):
|
||||||
if editor.has_line_numbers:
|
|
||||||
editor.go_to_line(item.line, item.col)
|
editor.go_to_line(item.line, item.col)
|
||||||
editor.set_focus()
|
editor.set_focus()
|
||||||
|
|
||||||
@ -812,7 +811,7 @@ class Boss(QObject):
|
|||||||
return error_dialog(
|
return error_dialog(
|
||||||
self.gui, _('Unsupported file format'),
|
self.gui, _('Unsupported file format'),
|
||||||
_('Editing files of type %s is not supported' % mime), show=True)
|
_('Editing files of type %s is not supported' % mime), show=True)
|
||||||
self.edit_file(name, syntax)
|
return self.edit_file(name, syntax)
|
||||||
|
|
||||||
# Editor basic controls {{{
|
# Editor basic controls {{{
|
||||||
def do_editor_undo(self):
|
def do_editor_undo(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user