diff --git a/ChangeLog.txt b/ChangeLog.txt index 66de4fc12..cc4b38722 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -56,6 +56,7 @@ - Fix visualization for tool Point from arc and tangent. - Changing settings for move and rotate tools through property browser does not take in count previous change for label point and Show label option. - Fix locking file after double save as. +- Key --ignoremargins still required margins. # Version 0.6.1 October 23, 2018 - [#885] Regression. Broken support for multi size measurements. diff --git a/src/app/valentina/core/vcmdexport.cpp b/src/app/valentina/core/vcmdexport.cpp index 176956c0c..be70fc2af 100644 --- a/src/app/valentina/core/vcmdexport.cpp +++ b/src/app/valentina/core/vcmdexport.cpp @@ -135,21 +135,29 @@ VLayoutGeneratorPtr VCommandLine::DefaultGenerator() const } }; - CheckKey(LONG_OPTION_LEFT_MARGIN, translate("VCommandLine", "Left margin must be used together with page units.")); - CheckKey(LONG_OPTION_RIGHT_MARGIN, - translate("VCommandLine", "Right margin must be used together with page units.")); - CheckKey(LONG_OPTION_TOP_MARGIN, translate("VCommandLine", "Top margin must be used together with page units.")); - CheckKey(LONG_OPTION_BOTTOM_MARGIN, - translate("VCommandLine", "Bottom margin must be used together with page units.")); + if (not IsOptionSet(LONG_OPTION_IGNORE_MARGINS)) + { + CheckKey(LONG_OPTION_LEFT_MARGIN, + translate("VCommandLine", "Left margin must be used together with page units.")); + CheckKey(LONG_OPTION_RIGHT_MARGIN, + translate("VCommandLine", "Right margin must be used together with page units.")); + CheckKey(LONG_OPTION_TOP_MARGIN, + translate("VCommandLine", "Top margin must be used together with page units.")); + CheckKey(LONG_OPTION_BOTTOM_MARGIN, + translate("VCommandLine", "Bottom margin must be used together with page units.")); + } - CheckKey(LONG_OPTION_TILED_PDF_LEFT_MARGIN, - translate("VCommandLine", "Tiled left margin must be used together with page units.")); - CheckKey(LONG_OPTION_TILED_PDF_RIGHT_MARGIN, - translate("VCommandLine", "Tiled right margin must be used together with page units.")); - CheckKey(LONG_OPTION_TILED_PDF_TOP_MARGIN, - translate("VCommandLine", "Tiled top margin must be used together with page units.")); - CheckKey(LONG_OPTION_TILED_PDF_BOTTOM_MARGIN, - translate("VCommandLine", "Tiled bottom margin must be used together with page units.")); + if (static_cast(OptExportType()) == LayoutExportFormats::PDFTiled) + { + CheckKey(LONG_OPTION_TILED_PDF_LEFT_MARGIN, + translate("VCommandLine", "Tiled left margin must be used together with page units.")); + CheckKey(LONG_OPTION_TILED_PDF_RIGHT_MARGIN, + translate("VCommandLine", "Tiled right margin must be used together with page units.")); + CheckKey(LONG_OPTION_TILED_PDF_TOP_MARGIN, + translate("VCommandLine", "Tiled top margin must be used together with page units.")); + CheckKey(LONG_OPTION_TILED_PDF_BOTTOM_MARGIN, + translate("VCommandLine", "Tiled bottom margin must be used together with page units.")); + } // if present units MUST be set before any other to keep conversions correct if (!diag.SelectTemplate(OptPaperSize()))