Resore height and size after load new measurements data.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-12-12 16:36:00 +02:00
parent abb7147bc8
commit a5bfb2af35

View File

@ -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);
}
}
}
}
}