mirror of
https://github.com/rbreu/beeref.git
synced 2026-03-11 08:54:28 +00:00
Don't wipe save file on json serializer errors
This commit is contained in:
parent
25652a5f5f
commit
1e2f6532c8
1 changed files with 2 additions and 1 deletions
|
|
@ -202,8 +202,9 @@ class BeeGraphicsView(QtWidgets.QGraphicsView):
|
|||
|
||||
def save_to_file(self, filename):
|
||||
logger.info(f'Saving to file {filename}')
|
||||
dump = bee_json.dumps({'items': self.scene.items_for_export()})
|
||||
with open(filename, 'w') as f:
|
||||
f.write(bee_json.dumps({'items': self.scene.items_for_export()}))
|
||||
f.write(dump)
|
||||
self.filename = filename
|
||||
|
||||
def open_from_file(self, filename):
|
||||
|
|
|
|||
Loading…
Reference in a new issue