From a5bfb2af35a694244be02b0c528c2ad9b1efc05b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 12 Dec 2015 16:36:00 +0200 Subject: [PATCH] Resore height and size after load new measurements data. --HG-- branch : develop --- src/app/valentina/mainwindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index c52c17538..c210c2452 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -1188,6 +1188,9 @@ void MainWindow::LoadStandard() if (not mPath.isEmpty()) { + const int hIndex = gradationHeights->currentIndex(); + const int sIndex = gradationSizes->currentIndex(); + if(LoadMeasurements(mPath)) { if (not doc->MPath().isEmpty()) @@ -1203,6 +1206,19 @@ void MainWindow::LoadStandard() doc->LiteParseTree(Document::LiteParse); UpdateWindowTitle(); + + if (qApp->patternType() == MeasurementsType::Standard) + { + if (hIndex != -1) + { + gradationHeights->setCurrentIndex(hIndex); + } + + if (sIndex != -1) + { + gradationSizes->setCurrentIndex(sIndex); + } + } } } }