Don't check margin keys if user pass --ignoremargins.

(grafted from 4a3352b0be6bd084640690666af96f0c784020a4)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-07-12 20:23:35 +03:00
parent c522651b6b
commit 979d5bd6ae
2 changed files with 23 additions and 14 deletions

View File

@ -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.

View File

@ -135,13 +135,20 @@ VLayoutGeneratorPtr VCommandLine::DefaultGenerator() const
}
};
CheckKey(LONG_OPTION_LEFT_MARGIN, translate("VCommandLine", "Left 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_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 (static_cast<LayoutExportFormats>(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,
@ -150,6 +157,7 @@ VLayoutGeneratorPtr VCommandLine::DefaultGenerator() const
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()))