X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fcommandline%2Fcmdlinemodulemanager.cpp;h=83f35de08bb2b031c9ad2936cc81a686cf635a5d;hb=86f86f19d985cd5516b5f8bd5d3dab4760d4b573;hp=a9fa6a0ad4455e4feae5b38338726e029cc60b82;hpb=bd8ff104f5c56e7040041a456a349dac48bf60d9;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/commandline/cmdlinemodulemanager.cpp b/src/gromacs/commandline/cmdlinemodulemanager.cpp index a9fa6a0ad4..83f35de08b 100644 --- a/src/gromacs/commandline/cmdlinemodulemanager.cpp +++ b/src/gromacs/commandline/cmdlinemodulemanager.cpp @@ -146,7 +146,8 @@ class CMainCommandLineModule : public ICommandLineModule CommandLineCommonOptionsHolder::CommandLineCommonOptionsHolder() : options_(NULL, NULL), bHelp_(false), bHidden_(false), bQuiet_(false), bVersion_(false), bCopyright_(true), - niceLevel_(19), bBackup_(true), bFpexcept_(false), debugLevel_(0) + niceLevel_(19), bNiceSet_(false), bBackup_(true), bFpexcept_(false), + debugLevel_(0) { binaryInfoSettings_.copyright(true); } @@ -168,7 +169,7 @@ void CommandLineCommonOptionsHolder::initOptions() .description("Print extended version information and quit")); options_.addOption(BooleanOption("copyright").store(&bCopyright_) .description("Print copyright information on startup")); - options_.addOption(IntegerOption("nice").store(&niceLevel_) + options_.addOption(IntegerOption("nice").store(&niceLevel_).storeIsSet(&bNiceSet_) .description("Set the nicelevel (default depends on command)")); options_.addOption(BooleanOption("backup").store(&bBackup_) .description("Write backups if output files exist")); @@ -193,7 +194,7 @@ bool CommandLineCommonOptionsHolder::finishOptions() void CommandLineCommonOptionsHolder::adjustFromSettings( const CommandLineModuleSettings &settings) { - if (!options_.isSet("nice")) + if (!bNiceSet_) { niceLevel_ = settings.defaultNiceLevel(); }