Fixed issue #942. Save Layout mode ignores paper format for tiled PDF.
(grafted from 235a477541863a5ec59ee6115ebfdab5f746b8ff) --HG-- branch : develop
This commit is contained in:
parent
883d2c04f6
commit
170238ede7
|
@ -26,6 +26,7 @@
|
||||||
- [#938] Dialog Seam Allowance doesn't block user from saving broken formula.
|
- [#938] Dialog Seam Allowance doesn't block user from saving broken formula.
|
||||||
- [#939] Calling Formula Wizard through property explorer doesn't refresh formula.
|
- [#939] Calling Formula Wizard through property explorer doesn't refresh formula.
|
||||||
- [#937] Wrong symmetrical seam corners on pieces.
|
- [#937] Wrong symmetrical seam corners on pieces.
|
||||||
|
- [#942] Save Layout mode ignores paper format for tiled PDF.
|
||||||
|
|
||||||
# Version 0.6.1 October 23, 2018
|
# Version 0.6.1 October 23, 2018
|
||||||
- [#885] Regression. Broken support for multi size measurements.
|
- [#885] Regression. Broken support for multi size measurements.
|
||||||
|
|
|
@ -81,7 +81,7 @@ void VAbstractLayoutDialog::InitTemplates(QComboBox *comboBoxTemplates)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QSizeF VAbstractLayoutDialog::GetTemplateSize(PaperSizeTemplate tmpl, Unit unit) const
|
QSizeF VAbstractLayoutDialog::GetTemplateSize(PaperSizeTemplate tmpl, Unit unit)
|
||||||
{
|
{
|
||||||
qreal width = 0;
|
qreal width = 0;
|
||||||
qreal height = 0;
|
qreal height = 0;
|
||||||
|
@ -155,7 +155,7 @@ QSizeF VAbstractLayoutDialog::GetTemplateSize(PaperSizeTemplate tmpl, Unit unit)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QSizeF VAbstractLayoutDialog::RoundTemplateSize(qreal width, qreal height, Unit unit) const
|
QSizeF VAbstractLayoutDialog::RoundTemplateSize(qreal width, qreal height, Unit unit)
|
||||||
{
|
{
|
||||||
qreal w = 0;
|
qreal w = 0;
|
||||||
qreal h = 0;
|
qreal h = 0;
|
||||||
|
|
|
@ -55,14 +55,15 @@ public:
|
||||||
Custom = 15};
|
Custom = 15};
|
||||||
|
|
||||||
explicit VAbstractLayoutDialog(QWidget *parent = nullptr);
|
explicit VAbstractLayoutDialog(QWidget *parent = nullptr);
|
||||||
QSizeF GetTemplateSize(PaperSizeTemplate tmpl, Unit unit) const;
|
|
||||||
|
static QSizeF GetTemplateSize(PaperSizeTemplate tmpl, Unit unit);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef QStringList FormatsVector;
|
typedef QStringList FormatsVector;
|
||||||
const static FormatsVector pageFormatNames;
|
const static FormatsVector pageFormatNames;
|
||||||
typedef int VIndexType;
|
typedef int VIndexType;
|
||||||
|
|
||||||
QSizeF RoundTemplateSize(qreal width, qreal height, Unit unit) const;
|
static QSizeF RoundTemplateSize(qreal width, qreal height, Unit unit);
|
||||||
|
|
||||||
void InitTemplates(QComboBox *comboBoxTemplates);
|
void InitTemplates(QComboBox *comboBoxTemplates);
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -1381,6 +1381,14 @@ void MainWindowsNoGUI::SetPrinterSettings(QPrinter *printer, const PrintType &pr
|
||||||
printer->setPaperSize (pSZ);
|
printer->setPaperSize (pSZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (not m_dialogSaveLayout.isNull())
|
||||||
|
{
|
||||||
|
VAbstractLayoutDialog::PaperSizeTemplate tiledFormat = m_dialogSaveLayout->GetTiledPageFormat();
|
||||||
|
printer->setPaperSize (m_dialogSaveLayout->GetTemplateSize(tiledFormat, Unit::Mm), QPrinter::Millimeter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
printer->setFullPage(ignorePrinterFields);
|
printer->setFullPage(ignorePrinterFields);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user