From e4cb99657e8d1a4a940a4e81c8482095f6cfe75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Poizl?= Date: Sun, 2 Mar 2025 13:45:58 +0100 Subject: [PATCH] Move aspect to resize in parameters --- loadrunable.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/loadrunable.cpp b/loadrunable.cpp index 5d9c449..d72a9b5 100644 --- a/loadrunable.cpp +++ b/loadrunable.cpp @@ -356,17 +356,16 @@ ConvertRunable::ConvertParams::ConvertParams(const QVariantMap &map) int h = size["height"].toInt(); resize = QSize(w, h); } - } - - if(map.contains("aspect")) - { - QString aspectStr = map["aspect"].toString(); - if(aspectStr == "keep") - aspect = Qt::KeepAspectRatio; - else if(aspectStr == "expand") - aspect = Qt::KeepAspectRatioByExpanding; - else if(aspectStr == "ignore") - aspect = Qt::IgnoreAspectRatio; + if(size.contains("aspect")) + { + QString aspectStr = map["aspect"].toString(); + if(aspectStr == "keep") + aspect = Qt::KeepAspectRatio; + else if(aspectStr == "expand") + aspect = Qt::KeepAspectRatioByExpanding; + else if(aspectStr == "ignore") + aspect = Qt::IgnoreAspectRatio; + } } if(map.contains("autostretch"))