Don't show install button if there's no URL to install from

This commit is contained in:
Ellwood Zwovic
2017-07-18 18:36:58 -07:00
parent 8747a66243
commit 5676a9e2c5

View File

@@ -491,8 +491,9 @@ class USERPREF_PT_packages(bpy.types.Panel):
lr2.label(text=blinfo.get('description', "")) lr2.label(text=blinfo.get('description', ""))
lr2.enabled = False #Give name more visual weight lr2.enabled = False #Give name more visual weight
right.operator(BPKG_OT_install.bl_idname, if pkg.get('url'):
text="Install").package_url=pkg.get('url', "") right.operator(BPKG_OT_install.bl_idname,
text="Install").package_url=pkg.get('url')
def expanded(): def expanded():
row1 = leftcol.row() row1 = leftcol.row()