mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -04:00
Merge pull request #300 from glutanimate/dynamic-addon-config-button
Disable add-on config button when no config present
This commit is contained in:
commit
3592365762
1 changed files with 3 additions and 1 deletions
|
@ -496,7 +496,9 @@ class AddonsDialog(QDialog):
|
||||||
addon = self.addons[row_int][1]
|
addon = self.addons[row_int][1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
addon = ''
|
addon = ''
|
||||||
self.form.viewPage.setEnabled(bool (re.match(r"^\d+$", addon)))
|
self.form.viewPage.setEnabled(bool(re.match(r"^\d+$", addon)))
|
||||||
|
self.form.config.setEnabled(bool(self.mgr.getConfig(addon) or
|
||||||
|
self.mgr.configAction(addon)))
|
||||||
|
|
||||||
def selectedAddons(self):
|
def selectedAddons(self):
|
||||||
idxs = [x.row() for x in self.form.addonList.selectedIndexes()]
|
idxs = [x.row() for x in self.form.addonList.selectedIndexes()]
|
||||||
|
|
Loading…
Reference in a new issue