From 8b6dbc0463b0c7422cb0b32a3f1c5d3f6714af83 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 12 Oct 2015 10:38:48 +0300 Subject: [PATCH] Fixed Issue #372 (bug when running Valentina from commandline). --HG-- branch : develop --- src/app/valentina/dialogs/dialoglayoutsettings.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.cpp b/src/app/valentina/dialogs/dialoglayoutsettings.cpp index 9db7c7d80..64a7a5445 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.cpp +++ b/src/app/valentina/dialogs/dialoglayoutsettings.cpp @@ -84,7 +84,6 @@ DialogLayoutSettings::DialogLayoutSettings(VLayoutGenerator *generator, QWidget RestoreDefaults(); } - connect(ui->comboBoxTemplates, static_cast(&QComboBox::currentIndexChanged), this, &DialogLayoutSettings::TemplateSelected); connect(ui->comboBoxPaperSizeUnit, static_cast(&QComboBox::currentIndexChanged), @@ -272,9 +271,7 @@ void DialogLayoutSettings::SetUnitePages(bool save) //--------------------------------------------------------------------------------------------------------------------- void DialogLayoutSettings::TemplateSelected() { - const QSizeF size = Template(); - - SheetSize(size); + SheetSize(Template()); } //--------------------------------------------------------------------------------------------------------------------- @@ -378,7 +375,6 @@ bool DialogLayoutSettings::SelectTemplate(const PaperSizeTemplate& id) if (index > -1) { ui->comboBoxTemplates->setCurrentIndex(index); - TemplateSelected(); } return (index > -1); @@ -430,7 +426,10 @@ void DialogLayoutSettings::DialogAccepted() //--------------------------------------------------------------------------------------------------------------------- void DialogLayoutSettings::RestoreDefaults() { + ui->comboBoxTemplates->blockSignals(true); ui->comboBoxTemplates->setCurrentIndex(0);//A0 + TemplateSelected(); + ui->comboBoxTemplates->blockSignals(false); SetLayoutWidth(VSettings::GetDefLayoutWidth()); SetShift(VSettings::GetDefLayoutShift());