From 7ef2c22c470d8e179aead42bebd4802a88e62b41 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 14 Dec 2015 09:39:57 +0200 Subject: [PATCH] Fixed bug with setting default height and size. Relative to the issue #418. --HG-- branch : develop --- src/app/valentina/mainwindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index c210c2452..b9bfe812f 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -2661,8 +2661,7 @@ void MainWindow::SetDefaultHeight() } else { - const int height = static_cast(UnitConvertor(pattern->height(), *pattern->GetPatternUnit(), Unit::Cm)); - index = gradationHeights->findText(QString().setNum(height)); + index = gradationHeights->findText(QString().setNum(pattern->height())); if (index != -1) { gradationHeights->setCurrentIndex(index); @@ -2686,8 +2685,7 @@ void MainWindow::SetDefaultSize() } else { - const int size = static_cast(UnitConvertor(pattern->size(), *pattern->GetPatternUnit(), Unit::Cm)); - index = gradationSizes->findText(QString().setNum(size)); + index = gradationSizes->findText(QString().setNum(pattern->size())); if (index != -1) { gradationSizes->setCurrentIndex(index);