Optimization. Call creation toolbar only if was not uploaded any measurements.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-12-11 17:06:20 +02:00
parent f600a00db8
commit 3aa1ccaea4
2 changed files with 5 additions and 2 deletions

View File

@ -3485,8 +3485,11 @@ bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasu
} }
} }
if (qApp->patternType() == MeasurementsType::Unknown)
{// Show toolbar only if was not uploaded any measurements.
ToolBarOption(); ToolBarOption();
} }
}
catch (VException &e) catch (VException &e)
{ {
qCCritical(vMainWindow, "%s\n\n%s\n\n%s", qUtf8Printable(tr("File error.")), qCCritical(vMainWindow, "%s\n\n%s\n\n%s", qUtf8Printable(tr("File error.")),

View File

@ -47,7 +47,7 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv)
appTranslator(nullptr), appTranslator(nullptr),
pmsTranslator(nullptr), pmsTranslator(nullptr),
_patternUnit(Unit::Cm), _patternUnit(Unit::Cm),
_patternType(MeasurementsType::Individual), _patternType(MeasurementsType::Unknown),
currentScene(nullptr), currentScene(nullptr),
sceneView(nullptr), sceneView(nullptr),
doc(nullptr), doc(nullptr),