Fix BrushCache serailization (#1358)

This commit is contained in:
Dennis Kobert
2023-08-04 20:34:54 +02:00
committed by GitHub
parent a267582b4c
commit 94a0f8282e
2 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ struct BrushCacheImpl {
last_stroke_texture: ImageFrame<Color>,
// A cache for brush textures.
#[serde(skip)]
#[cfg_attr(feature = "serde", serde(skip))]
brush_texture_cache: HashMap<BrushStyle, Image<Color>>,
}
@@ -99,6 +99,7 @@ pub struct BrushPlan {
pub first_stroke_point_skip: usize,
}
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, DynAny, Default)]
pub struct BrushCache {
inner: Arc<Mutex<BrushCacheImpl>>,