PyAPI: don't re-register add-ons on 'New File'

Some add-ons have bugs with re-registration,
they should be fixed, but no need to exacerbate the problem.
This commit is contained in:
Campbell Barton 2017-05-15 15:33:01 +10:00
parent 687ff699e9
commit b5b72a3f29

@ -165,12 +165,10 @@ def import_from_id(template_id, ignore_not_found=False):
def activate(template_id=None): def activate(template_id=None):
template_id_prev = _app_template["id"] template_id_prev = _app_template["id"]
# not needed but may as well avoid activating same template # not needed but may as well avoids redundant
# ... in fact keep this, it will show errors early on! # disable/enable for all add-ons on 'File -> New'
"""
if template_id_prev == template_id: if template_id_prev == template_id:
return return
"""
if template_id_prev: if template_id_prev:
_disable(template_id_prev) _disable(template_id_prev)