diff --git a/src/app/valentina/core/vcmdexport.cpp b/src/app/valentina/core/vcmdexport.cpp index 4946e7fa0..007eded8c 100644 --- a/src/app/valentina/core/vcmdexport.cpp +++ b/src/app/valentina/core/vcmdexport.cpp @@ -110,19 +110,6 @@ VLayoutGeneratorPtr VCommandLine::DefaultGenerator() const } - { - //just anonymous namespace ...don' like to have a,b,c,d everywhere defined - bool a = IsOptionSet(LONG_OPTION_SHIFTLENGTH); - bool b = IsOptionSet(LONG_OPTION_SHIFTUNITS); - - if ((a || b) && !(a && b)) - { - qCritical() << translate("VCommandLine", "Shift/Offset length must be used together with shift units.") - << "\n"; - const_cast(this)->parser.showHelp(V_EX_USAGE); - } - } - { //just anonymous namespace ...don' like to have a,b,c,d everywhere defined bool a = IsOptionSet(LONG_OPTION_GAPWIDTH); @@ -163,19 +150,6 @@ VLayoutGeneratorPtr VCommandLine::DefaultGenerator() const CheckKey(LONG_OPTION_TILED_PDF_BOTTOM_MARGIN, translate("VCommandLine", "Tiled bottom margin must be used together with page units.")); - const int rotateDegree = OptRotation(); - diag.SetRotate(rotateDegree != 0 ); // 0 disable rotation - - if (rotateDegree != VSettings::GetDefLayoutRotationIncrease())//Value by default - { - if (not diag.SetIncrease(rotateDegree)) - { - qCritical() << translate("VCommandLine", "Invalid rotation value. That must be one of predefined values.") - << "\n"; - const_cast(this)->parser.showHelp(V_EX_USAGE); - } - } - // if present units MUST be set before any other to keep conversions correct if (!diag.SelectTemplate(OptPaperSize())) { @@ -212,11 +186,6 @@ VLayoutGeneratorPtr VCommandLine::DefaultGenerator() const } } - if (IsOptionSet(LONG_OPTION_SHIFTLENGTH)) - { - diag.SetShift(Lo2Px(OptionValue(LONG_OPTION_SHIFTLENGTH), diag)); - } - if (IsOptionSet(LONG_OPTION_GAPWIDTH)) { diag.SetLayoutWidth(Lo2Px(OptionValue(LONG_OPTION_GAPWIDTH), diag)); @@ -256,6 +225,8 @@ VLayoutGeneratorPtr VCommandLine::DefaultGenerator() const diag.SetFields(margins); diag.SetFollowGrainline(IsOptionSet(LONG_OPTION_FOLLOW_GRAINLINE)); + diag.SetNestingTime(OptNestingTime()); + diag.SetEfficiencyCoefficient(OptEfficiencyCoefficient()); diag.DialogAccepted(); // filling VLayoutGenerator @@ -340,24 +311,6 @@ VAbstractLayoutDialog::PaperSizeTemplate VCommandLine::OptPaperSize() const return FormatSize(LONG_OPTION_PAGETEMPLATE); } -//------------------------------------------------------------------------------------------------------ -int VCommandLine::OptRotation() const -{ - int rotate = VSettings::GetDefLayoutRotationIncrease(); - if (IsOptionSet(LONG_OPTION_ROTATE)) - { - bool ok = false; - rotate = OptionValue(LONG_OPTION_ROTATE).toInt(&ok); - - if (not ok) - { - rotate = VSettings::GetDefLayoutRotationIncrease(); - } - } - - return rotate; -} - //------------------------------------------------------------------------------------------------------ Cases VCommandLine::OptGroup() const { @@ -635,6 +588,24 @@ void VCommandLine::InitCommandLineOptions() optionsUsed.insert(LONG_OPTION_MEASUREFILE, option); parser.addOption(option); + option = VCommandLineOption(QStringList({SINGLE_OPTION_NESTING_TIME, LONG_OPTION_NESTING_TIME}), + translate("VCommandLine", "