Fixed Issue #372 (bug when running Valentina from commandline).

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-12 10:38:48 +03:00
parent fc39c52b79
commit 8b6dbc0463

View File

@ -84,7 +84,6 @@ DialogLayoutSettings::DialogLayoutSettings(VLayoutGenerator *generator, QWidget
RestoreDefaults(); RestoreDefaults();
} }
connect(ui->comboBoxTemplates, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), connect(ui->comboBoxTemplates, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &DialogLayoutSettings::TemplateSelected); this, &DialogLayoutSettings::TemplateSelected);
connect(ui->comboBoxPaperSizeUnit, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), connect(ui->comboBoxPaperSizeUnit, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
@ -272,9 +271,7 @@ void DialogLayoutSettings::SetUnitePages(bool save)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogLayoutSettings::TemplateSelected() void DialogLayoutSettings::TemplateSelected()
{ {
const QSizeF size = Template(); SheetSize(Template());
SheetSize(size);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -378,7 +375,6 @@ bool DialogLayoutSettings::SelectTemplate(const PaperSizeTemplate& id)
if (index > -1) if (index > -1)
{ {
ui->comboBoxTemplates->setCurrentIndex(index); ui->comboBoxTemplates->setCurrentIndex(index);
TemplateSelected();
} }
return (index > -1); return (index > -1);
@ -430,7 +426,10 @@ void DialogLayoutSettings::DialogAccepted()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogLayoutSettings::RestoreDefaults() void DialogLayoutSettings::RestoreDefaults()
{ {
ui->comboBoxTemplates->blockSignals(true);
ui->comboBoxTemplates->setCurrentIndex(0);//A0 ui->comboBoxTemplates->setCurrentIndex(0);//A0
TemplateSelected();
ui->comboBoxTemplates->blockSignals(false);
SetLayoutWidth(VSettings::GetDefLayoutWidth()); SetLayoutWidth(VSettings::GetDefLayoutWidth());
SetShift(VSettings::GetDefLayoutShift()); SetShift(VSettings::GetDefLayoutShift());