From 12b4f8d77f19e289b1f4333a2e82dc83806a9e9e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 20 Aug 2016 20:08:34 +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. --HG-- branch : release --- 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 b3982e436..7dd4e14e6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -18,6 +18,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 37c6560cb..8523d047c 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3587,9 +3587,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; } //---------------------------------------------------------------------------------------------------------------------