Refactor tools and fix bugs

This commit is contained in:
Skyler Lehmkuhl
2026-03-08 18:44:32 -04:00
parent 0d2609c064
commit 09856ab52c
9 changed files with 1588 additions and 28 deletions
@@ -43,6 +43,7 @@ impl Action for RasterFillAction {
};
let kf = raster.ensure_keyframe_at(self.time, self.width, self.height);
kf.raw_pixels = self.buffer_after.clone();
kf.texture_dirty = true;
Ok(())
}
@@ -55,6 +56,7 @@ impl Action for RasterFillAction {
};
let kf = raster.ensure_keyframe_at(self.time, self.width, self.height);
kf.raw_pixels = self.buffer_before.clone();
kf.texture_dirty = true;
Ok(())
}
@@ -49,12 +49,14 @@ impl Action for RasterStrokeAction {
fn execute(&mut self, document: &mut Document) -> Result<(), String> {
let kf = get_keyframe_mut(document, &self.layer_id, self.time, self.width, self.height)?;
kf.raw_pixels = self.buffer_after.clone();
kf.texture_dirty = true;
Ok(())
}
fn rollback(&mut self, document: &mut Document) -> Result<(), String> {
let kf = get_keyframe_mut(document, &self.layer_id, self.time, self.width, self.height)?;
kf.raw_pixels = self.buffer_before.clone();
kf.texture_dirty = true;
Ok(())
}