Bugfix - voucher items manipulation fixed.
This commit is contained in:
@@ -131,7 +131,13 @@ void Voucher::addItem(QSharedPointer<VoucherItem> item)
|
||||
|
||||
void Voucher::removeItem(QSharedPointer<VoucherItem> item)
|
||||
{
|
||||
m_items.removeOne(item);
|
||||
if (item->id() != 0) {
|
||||
m_items.removeIf([&item](const auto& it){
|
||||
return item->id() == it->id();
|
||||
});
|
||||
} else {
|
||||
m_items.removeOne(item);
|
||||
}
|
||||
}
|
||||
|
||||
void Voucher::clearItems()
|
||||
|
||||
Reference in New Issue
Block a user