diff --git a/src/lay/lay/layApplication.cc b/src/lay/lay/layApplication.cc index 60c3d572b..46b7648f4 100644 --- a/src/lay/lay/layApplication.cc +++ b/src/lay/lay/layApplication.cc @@ -185,6 +185,7 @@ ApplicationBase::ApplicationBase (bool non_ui_mode) : gsi::ObjectBase (), m_lyp_map_all_cvs (true), m_lyp_add_default (false), + m_run_macro_and_exit (true), m_packages_with_dep (false), m_write_config_file (false), m_gtf_replay_rate (0), @@ -353,8 +354,19 @@ ApplicationBase::parse_cmd (int &argc, char **argv) } else if (a == "-r" && (i + 1) < argc) { + if (! m_run_macro.empty ()) { + throw tl::Exception (tl::to_string (QObject::tr ("Option -r or -rr can only be used once"))); + } m_run_macro = args [++i]; + } else if (a == "-rr" && (i + 1) < argc) { + + if (! m_run_macro.empty ()) { + throw tl::Exception (tl::to_string (QObject::tr ("Option -r or -rr can only be used once"))); + } + m_run_macro = args [++i]; + m_run_macro_and_exit = false; + } else if (a == "-rx") { m_no_macros = true; @@ -998,7 +1010,8 @@ ApplicationBase::usage () r += tl::to_string (QObject::tr (" -nn Technology file (.lyt) to use for next layout(s) on command line")) + "\n"; r += tl::to_string (QObject::tr (" -p Load the plugin (can be used multiple times)")) + "\n"; r += tl::to_string (QObject::tr (" -r