mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 06:18:12 +08:00
Fix zero-area artboard
This commit is contained in:
@@ -236,7 +236,7 @@ impl Fsm for ArtboardToolFsmState {
|
|||||||
ArtboardMessage::AddArtboard {
|
ArtboardMessage::AddArtboard {
|
||||||
id: Some(id),
|
id: Some(id),
|
||||||
position: (0., 0.),
|
position: (0., 0.),
|
||||||
size: (0., 0.),
|
size: (1., 1.),
|
||||||
}
|
}
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -872,7 +872,13 @@ impl Document {
|
|||||||
Some([vec![DocumentChanged], update_thumbnails_upstream(&path)].concat())
|
Some([vec![DocumentChanged], update_thumbnails_upstream(&path)].concat())
|
||||||
}
|
}
|
||||||
Operation::SetLayerTransform { path, transform } => {
|
Operation::SetLayerTransform { path, transform } => {
|
||||||
let transform = DAffine2::from_cols_array(&transform);
|
let mut transform = DAffine2::from_cols_array(&transform);
|
||||||
|
if transform.x_axis[0] == 0. {
|
||||||
|
transform.x_axis[0] = -1.
|
||||||
|
}
|
||||||
|
if transform.y_axis[1] == 0. {
|
||||||
|
transform.y_axis[1] = -1.
|
||||||
|
}
|
||||||
let layer = self.layer_mut(&path)?;
|
let layer = self.layer_mut(&path)?;
|
||||||
layer.transform = transform;
|
layer.transform = transform;
|
||||||
self.mark_as_dirty(&path)?;
|
self.mark_as_dirty(&path)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user