mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +08:00
Migrate the Text tool to the document graph (#1435)
* Update text tool to document graph * Fix selection issue * Log graph reruns and text node evals * Hash to set node * Fix let node crash * Fix loading document with fonts * Allow pressing enter to edit * Cleanup * Code review nits --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -41,6 +41,9 @@ pub struct DocumentNode {
|
||||
pub metadata: DocumentNodeMetadata,
|
||||
#[serde(default)]
|
||||
pub skip_deduplication: bool,
|
||||
/// Used as a hash of the graph input where applicable. This ensures that protonodes that depend on the graph's input are always regenerated.
|
||||
#[serde(default)]
|
||||
pub hash: u64,
|
||||
pub path: Option<Vec<NodeId>>,
|
||||
}
|
||||
|
||||
@@ -103,6 +106,7 @@ impl DocumentNode {
|
||||
construction_args: args,
|
||||
document_node_path: self.path.unwrap_or(Vec::new()),
|
||||
skip_deduplication: self.skip_deduplication,
|
||||
hash: self.hash,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user