Make graph state 'Clone'able

This commit is contained in:
Setzer22 2022-07-19 11:37:20 +02:00
parent 54ae2dc45f
commit 007c3e5480
2 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ use crate::{color_hex_utils::*, NodeTemplateIter, NodeTemplateTrait};
use egui::*;
#[derive(Clone)]
#[cfg_attr(feature = "persistence", derive(serde::Serialize, serde::Deserialize))]
pub struct NodeFinder<NodeTemplate> {
pub query: String,

View File

@ -10,6 +10,7 @@ pub struct PanZoom {
pub zoom: f32,
}
#[derive(Clone)]
#[cfg_attr(feature = "persistence", derive(Serialize, Deserialize))]
pub struct GraphEditorState<NodeData, DataType, ValueType, NodeTemplate, UserState> {
pub graph: Graph<NodeData, DataType, ValueType>,