mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Fix new document position (#421)
* Fix new document pos * All new documents are centered before deserialization * Move constructors to the top of to block * Fix merge (moving coe around is a bad idea) Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
parent
e54fedc6a5
commit
720a04b501
@@ -199,14 +199,14 @@ impl MessageHandler<DocumentsMessage, &InputPreprocessor> for DocumentsMessageHa
|
||||
}
|
||||
NewDocument => {
|
||||
let name = self.generate_new_document_name();
|
||||
let new_document = DocumentMessageHandler::with_name(name);
|
||||
let new_document = DocumentMessageHandler::with_name(name, ipp);
|
||||
self.load_document(new_document, responses);
|
||||
}
|
||||
OpenDocument => {
|
||||
responses.push_back(FrontendMessage::OpenDocumentBrowse.into());
|
||||
}
|
||||
OpenDocumentFile(name, serialized_contents) => {
|
||||
let document = DocumentMessageHandler::with_name_and_content(name, serialized_contents);
|
||||
let document = DocumentMessageHandler::with_name_and_content(name, serialized_contents, ipp);
|
||||
match document {
|
||||
Ok(document) => {
|
||||
self.load_document(document, responses);
|
||||
|
||||
Reference in New Issue
Block a user