Pārlūkot izejas kodu

Use _icon_dir as absolute path when it starts with /

pull/455/head
Erwin Van de Velde pirms 3 gadiem
vecāks
revīzija
d6b8a8cdb1
1 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. +6
    -2
      diagrams/__init__.py

+ 6
- 2
diagrams/__init__.py Parādīt failu

@@ -414,8 +414,12 @@ class Node:
return uuid.uuid4().hex

def _load_icon(self):
basedir = Path(os.path.abspath(os.path.dirname(__file__)))
return os.path.join(basedir.parent, self._icon_dir, self._icon)
if self._icon_dir is None or not self._icon_dir.startswith(os.path.sep):
basedir = Path(os.path.abspath(os.path.dirname(__file__)))
return os.path.join(basedir.parent, self._icon_dir, self._icon)
else:
return os.path.join(self._icon_dir, self._icon)



class Edge:


Notiek ielāde…
Atcelt
Saglabāt