From 49208a640d346eb34f5645aff76715c1e3819a4e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 10 Nov 2016 14:15:43 +0200 Subject: [PATCH] Fix few bugs with apllying changes for seam allowance. --HG-- branch : feature --- src/libs/vtools/dialogs/tools/dialogseamallowance.cpp | 6 +++--- src/libs/vtools/dialogs/tools/dialogseamallowance.ui | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/vtools/dialogs/tools/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/dialogseamallowance.cpp index b8c42a614..f721b81af 100644 --- a/src/libs/vtools/dialogs/tools/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/dialogseamallowance.cpp @@ -63,7 +63,7 @@ DialogSeamAllowance::DialogSeamAllowance(const VContainer *data, const quint32 & ui->listWidget->setContextMenuPolicy(Qt::CustomContextMenu); connect(ui->listWidget, &QListWidget::customContextMenuRequested, this, &DialogSeamAllowance::ShowContextMenu); connect(ui->listWidget->model(), &QAbstractItemModel::rowsMoved, this, &DialogSeamAllowance::ListChanged); - connect(ui->checkBoxSeams, &QCheckBox::clicked, this, &DialogSeamAllowance::EnableSeamAllowance); + connect(ui->checkBoxSeams, &QCheckBox::toggled, this, &DialogSeamAllowance::EnableSeamAllowance); if (not applyAllowed) { @@ -104,8 +104,7 @@ void DialogSeamAllowance::SetPiece(const VPiece &piece) ui->checkBoxForbidFlipping->setChecked(m_piece.IsForbidFlipping()); ui->doubleSpinBoxSeams->setValue(m_piece.GetSAWidth()); - - EnableSeamAllowance(m_piece.IsSeamAllowance()); + ui->checkBoxSeams->setChecked(m_piece.IsSeamAllowance()); ValidObjects(MainPathIsValid()); } @@ -283,6 +282,7 @@ VPiece DialogSeamAllowance::CreatePiece() const } piece.SetForbidFlipping(ui->checkBoxForbidFlipping->isChecked()); + piece.SetSeamAllowance(ui->checkBoxSeams->isChecked()); piece.SetSAWidth(ui->doubleSpinBoxSeams->value()); return piece; diff --git a/src/libs/vtools/dialogs/tools/dialogseamallowance.ui b/src/libs/vtools/dialogs/tools/dialogseamallowance.ui index 770b89f1d..389f40739 100644 --- a/src/libs/vtools/dialogs/tools/dialogseamallowance.ui +++ b/src/libs/vtools/dialogs/tools/dialogseamallowance.ui @@ -101,7 +101,7 @@ Seam allowance - true + false