Skip to content
Snippets Groups Projects
Commit f2221f47 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

print messages on terminal was not correctly restored from the option file

parent a7812504
No related branches found
No related tags found
No related merge requests found
...@@ -285,9 +285,10 @@ void PrintUsage(const std::string &name) ...@@ -285,9 +285,10 @@ void PrintUsage(const std::string &name)
void GetOptions(int argc, char *argv[]) void GetOptions(int argc, char *argv[])
{ {
// print messages on terminal // print messages on terminal (use special 99 value so that we can detect if
// it was later set to 1 in the option file)
int terminal = CTX::instance()->terminal; int terminal = CTX::instance()->terminal;
CTX::instance()->terminal = 1; CTX::instance()->terminal = 99;
#if defined(HAVE_PARSER) #if defined(HAVE_PARSER)
if(argc && argv){ if(argc && argv){
...@@ -1137,5 +1138,6 @@ void GetOptions(int argc, char *argv[]) ...@@ -1137,5 +1138,6 @@ void GetOptions(int argc, char *argv[])
else else
GModel::current()->setFileName(CTX::instance()->files[0]); GModel::current()->setFileName(CTX::instance()->files[0]);
CTX::instance()->terminal = terminal; if(CTX::instance()->terminal == 99)
CTX::instance()->terminal = terminal;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment