diff --git a/Telegram/SourceFiles/editor/photo_editor_layer_widget.cpp b/Telegram/SourceFiles/editor/photo_editor_layer_widget.cpp index 5143af395..257e47ec4 100644 --- a/Telegram/SourceFiles/editor/photo_editor_layer_widget.cpp +++ b/Telegram/SourceFiles/editor/photo_editor_layer_widget.cpp @@ -59,13 +59,14 @@ void OpenWithPreparedFile( }; auto copy = image->data; const auto fileImage = std::make_shared(std::move(copy)); + const auto keepRatio = !exactSize.isEmpty(); auto editor = base::make_unique_q( 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(parent, std::move(editor)); InitEditorLayer(layer.get(), raw, std::move(callback));