mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-03 21:08:18 +00: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:
parent
d7c5658852
commit
ab2de96640
4 changed files with 35 additions and 25 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue