mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-28 15:20:15 +00:00
Fix incorrect cropping rectangle calculation in canvas size command in lua script
Prior to this fix, CanvasSize command via lua script results in bad canvas and image clipping.
This commit is contained in:
parent
f687ddef72
commit
83c18399a4
@ -364,9 +364,14 @@ void CanvasSizeCommand::onExecute(Context* context)
|
||||
|
||||
Preferences::instance().canvasSize.trimOutside(params.trimOutside());
|
||||
|
||||
bounds.enlarge(
|
||||
gfx::Border(params.left(), params.top(),
|
||||
params.right(), params.bottom()));
|
||||
if (params.bounds.isSet()) {
|
||||
bounds = params.bounds();
|
||||
}
|
||||
else {
|
||||
bounds.enlarge(
|
||||
gfx::Border(params.left(), params.top(),
|
||||
params.right(), params.bottom()));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user