Fix few bugs with apllying changes for seam allowance.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-11-10 14:15:43 +02:00
parent f992bb7bbd
commit 49208a640d
2 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ DialogSeamAllowance::DialogSeamAllowance(const VContainer *data, const quint32 &
ui->listWidget->setContextMenuPolicy(Qt::CustomContextMenu); ui->listWidget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui->listWidget, &QListWidget::customContextMenuRequested, this, &DialogSeamAllowance::ShowContextMenu); connect(ui->listWidget, &QListWidget::customContextMenuRequested, this, &DialogSeamAllowance::ShowContextMenu);
connect(ui->listWidget->model(), &QAbstractItemModel::rowsMoved, this, &DialogSeamAllowance::ListChanged); 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) if (not applyAllowed)
{ {
@ -104,8 +104,7 @@ void DialogSeamAllowance::SetPiece(const VPiece &piece)
ui->checkBoxForbidFlipping->setChecked(m_piece.IsForbidFlipping()); ui->checkBoxForbidFlipping->setChecked(m_piece.IsForbidFlipping());
ui->doubleSpinBoxSeams->setValue(m_piece.GetSAWidth()); ui->doubleSpinBoxSeams->setValue(m_piece.GetSAWidth());
ui->checkBoxSeams->setChecked(m_piece.IsSeamAllowance());
EnableSeamAllowance(m_piece.IsSeamAllowance());
ValidObjects(MainPathIsValid()); ValidObjects(MainPathIsValid());
} }
@ -283,6 +282,7 @@ VPiece DialogSeamAllowance::CreatePiece() const
} }
piece.SetForbidFlipping(ui->checkBoxForbidFlipping->isChecked()); piece.SetForbidFlipping(ui->checkBoxForbidFlipping->isChecked());
piece.SetSeamAllowance(ui->checkBoxSeams->isChecked());
piece.SetSAWidth(ui->doubleSpinBoxSeams->value()); piece.SetSAWidth(ui->doubleSpinBoxSeams->value());
return piece; return piece;

View File

@ -101,7 +101,7 @@
<string>Seam allowance</string> <string>Seam allowance</string>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>