Skip to content

Commit

Permalink
Make small ui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
teekuningas committed Mar 15, 2024
1 parent b817c2c commit c1add84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions meggie/configuration.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"id": "meggie",
"tabs": [
{"id": "preprocessing",
"name": "Preprocessing",
Expand Down
8 changes: 6 additions & 2 deletions meggie/mainwindow/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ def find_all_package_specs():
continue
with open(config_path, "r") as f:
config = json.load(f)
if config:
if config and config.get("id"):
package_specs[source] = config

# add possibly missing fields
for package_spec in package_specs.values():
if "name" not in package_spec:
package_spec["name"] = ""
package_spec["name"] = package_spec["id"]

if "description" not in package_spec:
package_spec["description"] = package_spec.get("name", "")

if "author" not in package_spec:
package_spec["author"] = ""
Expand Down Expand Up @@ -462,6 +465,7 @@ def connect_to_handler(button, name):
def handler_wrapper(checked):
experiment = self.parent.experiment
if not experiment:
messagebox(self, "You need to open an experiment first.")
return

subject = experiment.active_subject
Expand Down

0 comments on commit c1add84

Please sign in to comment.