Skip to content

Commit b554c3c

Browse files
author
Lachlan Grose
committed
fix: lavavu.camera bug when keys are missing
1 parent ff91507 commit b554c3c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

LoopStructural/visualisation/lavavu.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from pyrsistent import v
12
from .model_plotter import BaseModelPlotter
23
from LoopStructural.utils import getLogger
34
from LoopStructural.utils import LoopImportError
@@ -409,6 +410,12 @@ def camera(self):
409410

410411
@camera.setter
411412
def camera(self, camera):
413+
# for some reason lavavu complains if the keys
414+
# attributes aren't already in the dict, so add them and then
415+
# call camera
416+
for key, value in camera.items():
417+
self.lv[key] = value
418+
412419
self.lv.camera(camera)
413420

414421
@property

0 commit comments

Comments
 (0)