From d2791a1a6b96b9ac5e06c1f17faf0df3770b2b22 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 20 Aug 2016 20:47:39 +0300 Subject: [PATCH] Fixed Valentina.exe bug in command line mode. Not all errors were correctly catched in comsole mode. This caused method LoadPattern return successes where in reality was an error. Also this bug made regression tests less useful. (grafted from fbf1dfae06b21d88189d771f2b2e45eeb84a02ce) --HG-- branch : develop --- ChangeLog.txt | 1 + src/app/valentina/mainwindow.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index af257fba3..b970dacc5 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -58,6 +58,7 @@ - [#544] Error: Color Lines are black until touched. - [#543] Detail loses details. - [#548] Bug Detail tool. Case when seam allowance is wrong. +- Called the main app in console mode doesn't show opening file error in some cases. # Version 0.4.4 April 12, 2016 - Updated measurement templates with all measurements. Added new template Aldrich/Women measurements. diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index ed87bca91..e193e4b58 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3852,9 +3852,15 @@ bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasu ZoomFirstShow(); ActionDraw(true); + + qApp->setOpeningPattern();// End opening file + return true; + } + else + { + qApp->setOpeningPattern();// End opening file + return false; } - qApp->setOpeningPattern();// End opening file - return true; } //---------------------------------------------------------------------------------------------------------------------