Update piece path name after change.
--HG-- branch : feature
This commit is contained in:
parent
0739b3f8a3
commit
c7d61aec49
|
@ -662,6 +662,7 @@ void DialogSeamAllowance::PathDialogClosed(int result)
|
|||
const_cast<VContainer *>(data),
|
||||
dialogTool->GetToolId());
|
||||
qApp->getUndoStack()->push(saveCommand);
|
||||
UpdateCurrentRecord();
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -931,3 +932,18 @@ void DialogSeamAllowance::InitSAIncludeType()
|
|||
ui->comboBoxIncludeType->addItem(tr("custom seam allowance"),
|
||||
static_cast<unsigned char>(PiecePathIncludeType::AsCustomSA));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogSeamAllowance::UpdateCurrentRecord()
|
||||
{
|
||||
const int row = ui->listWidgetCustomSA->currentRow();
|
||||
if (ui->listWidgetCustomSA->count() == 0 || row == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QListWidgetItem *item = ui->listWidgetCustomSA->item(row);
|
||||
SCASSERT(item != nullptr);
|
||||
const CustomSARecord record = qvariant_cast<CustomSARecord>(item->data(Qt::UserRole));
|
||||
item->setText(GetCustomSARecordName(record));
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ private:
|
|||
void InitNodesList();
|
||||
void InitCSAPoint(QComboBox *box);
|
||||
void InitSAIncludeType();
|
||||
void UpdateCurrentRecord();
|
||||
|
||||
QListWidgetItem *GetItemById(quint32 id);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ void SavePiecePathOptions::redo()
|
|||
DecrementReferences(m_oldPath.MissingNodes(m_newPath));
|
||||
|
||||
SCASSERT(m_data);
|
||||
m_data->UpdatePiecePath(nodeId, m_oldPath);
|
||||
m_data->UpdatePiecePath(nodeId, m_newPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user