[PD] simplify item handling
according to https://github.com/FreeCAD/FreeCAD/commit/2b676020 "QListWidget::takeItem() returns a pointer to the removed item. So a previous call of QListWidget::item() is superfluous"
This commit is contained in:
@@ -241,10 +241,9 @@ void TaskLoftParameters::onDeleteSection()
|
||||
{
|
||||
// Delete the selected profile
|
||||
int row = ui->listWidgetReferences->currentRow();
|
||||
QListWidgetItem* item = ui->listWidgetReferences->item(row);
|
||||
QListWidgetItem* item = ui->listWidgetReferences->takeItem(row);
|
||||
if (item) {
|
||||
QByteArray data = item->data(Qt::UserRole).toByteArray();
|
||||
ui->listWidgetReferences->takeItem(row);
|
||||
delete item;
|
||||
|
||||
// search inside the list of sections
|
||||
|
||||
Reference in New Issue
Block a user