From 3aa1ccaea493ec44fb4e4ba2c0336d3f20402e38 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 11 Dec 2015 17:06:20 +0200 Subject: [PATCH] Optimization. Call creation toolbar only if was not uploaded any measurements. --HG-- branch : develop --- src/app/valentina/mainwindow.cpp | 5 ++++- src/libs/vmisc/vabstractapplication.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 53b25e8b4..c52c17538 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3485,7 +3485,10 @@ bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasu } } - ToolBarOption(); + if (qApp->patternType() == MeasurementsType::Unknown) + {// Show toolbar only if was not uploaded any measurements. + ToolBarOption(); + } } catch (VException &e) { diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 3da432aa9..174652609 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -47,7 +47,7 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv) appTranslator(nullptr), pmsTranslator(nullptr), _patternUnit(Unit::Cm), - _patternType(MeasurementsType::Individual), + _patternType(MeasurementsType::Unknown), currentScene(nullptr), sceneView(nullptr), doc(nullptr),