Added binary file format
This commit is contained in:
@@ -40,7 +40,7 @@ from bedit.core.model import (
|
||||
)
|
||||
from bedit.core.simulation import Simulation
|
||||
from bedit.core.port_types import PortTypeRegistry
|
||||
from bedit.core.serializer import JsonDocumentSerializer
|
||||
from bedit.core.serializer import DocumentSerializer
|
||||
|
||||
|
||||
class DocumentController(QObject):
|
||||
@@ -108,7 +108,7 @@ class DocumentController(QObject):
|
||||
self.filePathChanged.emit(None)
|
||||
|
||||
def load(self, path: Path) -> None:
|
||||
self.document = JsonDocumentSerializer.load(path)
|
||||
self.document = DocumentSerializer.load(path)
|
||||
self.active_component_id = next(iter(self.document.roots), None)
|
||||
self.file_path = path
|
||||
self.undo_stack.clear()
|
||||
@@ -124,7 +124,7 @@ class DocumentController(QObject):
|
||||
target = path or self.file_path
|
||||
if target is None:
|
||||
raise ValueError("No file path has been selected")
|
||||
JsonDocumentSerializer.save(self.document, target)
|
||||
DocumentSerializer.save(self.document, target)
|
||||
self.file_path = target
|
||||
self.undo_stack.setClean()
|
||||
self.filePathChanged.emit(target)
|
||||
|
||||
Reference in New Issue
Block a user