mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-03 02:48:11 +08:00
Disallow zero-area artboards (#794)
* Fix zero-area artboard
* Add artboard only when user starts dragging
* Rename variables for clarity
* Revert regression caused by commit a11c9ef6ef
* Fix zero-area artboard properly
This commit is contained in:
committed by
Keavon Chambers
parent
7b4c43ff8d
commit
b10d7a93b6
@@ -94,7 +94,14 @@ impl MessageHandler<ArtboardMessage, &FontCache> for ArtboardMessageHandler {
|
||||
);
|
||||
}
|
||||
}
|
||||
ResizeArtboard { artboard, position, size } => {
|
||||
ResizeArtboard { artboard, position, mut size } => {
|
||||
if size.0.abs() == 0. {
|
||||
size.0 = size.0.signum();
|
||||
}
|
||||
if size.1.abs() == 0. {
|
||||
size.1 = size.1.signum();
|
||||
}
|
||||
|
||||
responses.push_back(
|
||||
ArtboardMessage::DispatchOperation(Box::new(DocumentOperation::SetLayerTransform {
|
||||
path: vec![artboard],
|
||||
|
||||
Reference in New Issue
Block a user