From 4741892ee676880e17d45c99a90339db17608a10 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 6 Mar 2019 13:25:46 -0500 Subject: [PATCH] Fix helper.py syntax error --- helper.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helper.py b/helper.py index 13fc6333..dca11501 100755 --- a/helper.py +++ b/helper.py @@ -162,7 +162,7 @@ def create_manifest(plugin_dir, slug=None): # Query manifest information if not slug: - slug = input_default("Plugin slug (unique identifier)", slug) + slug = input_default("Plugin slug (unique identifier)") manifest['slug'] = slug manifest['name'] = input_default("Plugin name", slug) manifest['version'] = input_default("Version", "1.0.0") @@ -478,13 +478,13 @@ struct {identifier}Widget : ModuleWidget {{ if len(components['widgets']) > 0: source += "\n" for c in components['widgets']: - else: + if 'x' in c: source += f""" // mm2px(Vec({c['width']}, {c['height']})) - if 'x' in c: + addChild(createWidget(mm2px(Vec({c['x']}, {c['y']}))));""" + else: source += f""" addChild(createWidgetCentered(mm2px(Vec({c['cx']}, {c['cy']}))));""" - addChild(createWidget(mm2px(Vec({c['x']}, {c['y']}))));""" source += f""" }}