Support symbol None (from old versions)

Fix #732
pull/774/head
Julien Duponchelle 8 years ago
parent 66a789672d
commit 43236746f9
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -204,6 +204,9 @@ class Node:
@symbol.setter
def symbol(self, val):
if val is None:
val = ":/symbols/computer.svg"
# No abs path, fix them (bug of 1.X)
if not val.startswith(":") and os.path.abspath(val):
val = os.path.basename(val)

@ -146,7 +146,7 @@ NODE_OBJECT_SCHEMA = {
"label": LABEL_OBJECT_SCHEMA,
"symbol": {
"description": "Symbol of the node",
"type": "string",
"type": ["string", "null"],
"minLength": 1
},
"width": {

Loading…
Cancel
Save