mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Fix brush layers growing hugely when resizing transforms with Select tool (#1201)
* Fix brush tool resize * Fix typo * Fix image transforms * Remove input from image network * Fix merge error --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
parent
d7c5658852
commit
ab2de96640
@@ -243,6 +243,13 @@ where
|
||||
|
||||
impl<P: Copy + Pixel> ImageFrame<P> {
|
||||
pub const fn empty() -> Self {
|
||||
Self {
|
||||
image: Image::empty(),
|
||||
transform: DAffine2::ZERO,
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn identity() -> Self {
|
||||
Self {
|
||||
image: Image::empty(),
|
||||
transform: DAffine2::IDENTITY,
|
||||
@@ -307,7 +314,7 @@ pub struct ExtractImageFrame;
|
||||
impl<'a: 'input, 'input> Node<'input, EditorApi<'a>> for ExtractImageFrame {
|
||||
type Output = ImageFrame<Color>;
|
||||
fn eval(&'input self, mut editor_api: EditorApi<'a>) -> Self::Output {
|
||||
editor_api.image_frame.take().unwrap_or(ImageFrame::empty())
|
||||
editor_api.image_frame.take().unwrap_or(ImageFrame::identity())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user