From 3eea6115b0c0380cbe2f681d1a9cf21906cde74d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 10 Dec 2017 19:16:12 +0200 Subject: [PATCH] When compare a template size check both versions: portrait and landscape. --HG-- branch : develop --- src/app/valentina/dialogs/dialoglayoutsettings.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.cpp b/src/app/valentina/dialogs/dialoglayoutsettings.cpp index 71ee10958..5a9fe906b 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.cpp +++ b/src/app/valentina/dialogs/dialoglayoutsettings.cpp @@ -355,7 +355,6 @@ void DialogLayoutSettings::FindTemplate() { const qreal width = ui->doubleSpinBoxPaperWidth->value(); const qreal height = ui->doubleSpinBoxPaperHeight->value(); - QSizeF size(width, height); const Unit paperUnit = PaperUnit(); @@ -363,7 +362,7 @@ void DialogLayoutSettings::FindTemplate() for (int i=0; i < max; ++i) { const QSizeF tmplSize = GetTemplateSize(static_cast(i), paperUnit); - if (size == tmplSize) + if (QSizeF(width, height) == tmplSize || QSizeF(height, width) == tmplSize) { ui->comboBoxTemplates->blockSignals(true); const int index = ui->comboBoxTemplates->findData(i);