mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Move toggle check into toggle if.
This commit is contained in:
parent
b0993c006f
commit
a0d9b093da
@ -525,11 +525,11 @@ class ConfigDialog(QDialog, Ui_Dialog):
|
||||
index = self.plugin_view.currentIndex()
|
||||
if index.isValid():
|
||||
plugin = self._plugin_model.index_to_plugin(index)
|
||||
if not plugin.can_be_disabled:
|
||||
error_dialog(self,_('Plugin cannot be disabled'),
|
||||
_('The plugin: %s cannot be disabled')%plugin.name).exec_()
|
||||
return
|
||||
if op == 'toggle':
|
||||
if not plugin.can_be_disabled:
|
||||
error_dialog(self,_('Plugin cannot be disabled'),
|
||||
_('The plugin: %s cannot be disabled')%plugin.name).exec_()
|
||||
return
|
||||
if is_disabled(plugin):
|
||||
enable_plugin(plugin)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user