diff --git a/ChangeLog b/ChangeLog index a50c2ad..8dd5c6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,9 @@ -2016-08-03 +2016-08-04 * Version 1.2.0 released ========================= + Fix loss of application name and version (#1835) Add methods for logging in applications (#1828) Fix removal of Python wrappers after make clean (#1826) Add GModelSpectralExpInvPlaw class (#1800) diff --git a/NEWS b/NEWS index 05e7328..7120986 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ New Features and Important Changes in GammaLib 1.2.0 -3 August 2016 +4 August 2016 1. Introduction @@ -58,6 +58,10 @@ log_header2(), and log_header3() have been introduced. There are three variants of log_value() for strings, integers and double precision values (#1828). +The application name and version and now conserved in a GApplication::clear() +method call and the application is properly initialised like in the call of +a constructor (#1835). + 5. Base module -------------- diff --git a/README.md b/README.md index 114f39f..99af9c1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ GammaLib information ==================== -* Version: 1.2.0.dev1 (3 August 2016) +* Version: 1.2.0.dev1 (4 August 2016) * Author: Juergen Knoedlseder (jurgen.knodlseder@irap.omp.eu) [![Build Status](https://cta-jenkins.irap.omp.eu/buildStatus/icon?job=gammalib-integrate-os)](https://cta-jenkins.irap.omp.eu/job/gammalib-integrate-os/) diff --git a/src/app/GApplication.cpp b/src/app/GApplication.cpp index 005dd64..b5a4100 100644 --- a/src/app/GApplication.cpp +++ b/src/app/GApplication.cpp @@ -238,12 +238,32 @@ GApplication& GApplication::operator=(const GApplication& app) ***************************************************************************/ void GApplication::clear(void) { + // Save application name and version as we need them to reconstruct + // the application after freeing and initialising its members + std::string name = m_name; + std::string version = m_version; + // Free members free_members(); // Initialise members init_members(); + // Recover saved application name and version + m_name = name; + m_version = version; + + // Set default parfile and logfile name + m_parfile = name+".par"; + m_logfile = name+".log"; + + // Initialise application parameters + m_pars.load(par_filename()); + + // Set log filename and chattiness + set_log_filename(); + set_log_chatter(); + // Return return; }