Show help message if positional parameters is present

This commit is contained in:
Magne Sjaastad 2014-06-05 07:34:34 +02:00
parent dbdd28fcde
commit f68aa1908d

View File

@ -843,7 +843,12 @@ bool RiaApplication::parseArguments()
bool parseOk = progOpt.parse(cvfqt::Utils::toStringVector(arguments));
if (!parseOk || progOpt.hasOption("help") || progOpt.hasOption("?"))
// If positional parameter functionality is to be supported, the test for existence of positionalParameters must be removed
// This is based on a pull request by @andlaus https://github.com/OPM/ResInsight/pull/162
if (!parseOk ||
progOpt.hasOption("help") ||
progOpt.hasOption("?") ||
progOpt.positionalParameters().size() > 0)
{
#if defined(_MSC_VER) && defined(_WIN32)
showFormattedTextInMessageBox(m_helpText);