Search an item from internal path list to remove in reverse order.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-05-07 18:01:50 +03:00
parent 180332d279
commit 4f7099294a

View File

@ -1145,7 +1145,7 @@ void DialogPiecePath::SetCutPath(bool value)
//---------------------------------------------------------------------------------------------------------------------
QListWidgetItem *DialogPiecePath::GetItemById(quint32 id)
{
for (qint32 i = 0; i < ui->listWidget->count(); ++i)
for (qint32 i = ui->listWidget->count()-1; i >= 0; --i)
{
QListWidgetItem *item = ui->listWidget->item(i);
const VPieceNode node = qvariant_cast<VPieceNode>(item->data(Qt::UserRole));