Fix bug. Used wrong combobox.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-11-29 15:30:33 +02:00
parent ffec656d33
commit 9275968bbc

View File

@ -518,10 +518,12 @@ void DialogSeamAllowance::CSAIncludeTypeChanged(int index)
} }
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0) #if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
const PiecePathIncludeType type = static_cast<PiecePathIncludeType>(ui->comboBoxEndPoint->itemData(index).toUInt()); const PiecePathIncludeType type =
static_cast<PiecePathIncludeType>(ui->comboBoxIncludeType->itemData(index).toUInt());
#else #else
Q_UNUSED(index); Q_UNUSED(index);
const PiecePathIncludeType type = static_cast<PiecePathIncludeType>(ui->comboBoxEndPoint->currentData().toUInt()); const PiecePathIncludeType type =
static_cast<PiecePathIncludeType>(ui->comboBoxIncludeType->currentData().toUInt());
#endif #endif
QListWidgetItem *rowItem = ui->listWidgetCustomSA->item(row); QListWidgetItem *rowItem = ui->listWidgetCustomSA->item(row);
@ -659,6 +661,14 @@ VPiece DialogSeamAllowance::CreatePiece() const
piece.GetPath().Append(qvariant_cast<VPieceNode>(item->data(Qt::UserRole))); piece.GetPath().Append(qvariant_cast<VPieceNode>(item->data(Qt::UserRole)));
} }
QVector<CustomSARecord> records;
for (qint32 i = 0; i < ui->listWidgetCustomSA->count(); ++i)
{
QListWidgetItem *item = ui->listWidgetCustomSA->item(i);
records.append(qvariant_cast<CustomSARecord>(item->data(Qt::UserRole)));
}
piece.SetCustomSARecords(records);
piece.SetForbidFlipping(ui->checkBoxForbidFlipping->isChecked()); piece.SetForbidFlipping(ui->checkBoxForbidFlipping->isChecked());
piece.SetSeamAllowance(ui->checkBoxSeams->isChecked()); piece.SetSeamAllowance(ui->checkBoxSeams->isChecked());
piece.SetSAWidth(ui->doubleSpinBoxSeams->value()); piece.SetSAWidth(ui->doubleSpinBoxSeams->value());