mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +02:00
Fix arbitrary aspect in photo editor crop.
This commit is contained in:
parent
16830a410c
commit
ded0936bc4
1 changed files with 2 additions and 1 deletions
|
@ -59,13 +59,14 @@ void OpenWithPreparedFile(
|
|||
};
|
||||
auto copy = image->data;
|
||||
const auto fileImage = std::make_shared<Image>(std::move(copy));
|
||||
const auto keepRatio = !exactSize.isEmpty();
|
||||
auto editor = base::make_unique_q<PhotoEditor>(
|
||||
parent,
|
||||
show,
|
||||
show,
|
||||
fileImage,
|
||||
image->modifications,
|
||||
EditorData{ .exactSize = exactSize, .keepAspectRatio = true });
|
||||
EditorData{ .exactSize = exactSize, .keepAspectRatio = keepRatio });
|
||||
const auto raw = editor.get();
|
||||
auto layer = std::make_unique<LayerWidget>(parent, std::move(editor));
|
||||
InitEditorLayer(layer.get(), raw, std::move(callback));
|
||||
|
|
Loading…
Add table
Reference in a new issue