Use std::any_of
This commit is contained in:
@@ -519,10 +519,10 @@ bool EditTagDialog::DoesValueVary(const QModelIndexList &sel, const QString &id)
|
||||
|
||||
bool EditTagDialog::IsValueModified(const QModelIndexList &sel, const QString &id) const {
|
||||
|
||||
for (const QModelIndex &i : sel) {
|
||||
if (data_[i.row()].original_value(id) != data_[i.row()].current_value(id))
|
||||
return true;
|
||||
if (std::any_of(sel.begin(), sel.end(), [=](const QModelIndex &i){ return data_[i.row()].original_value(id) != data_[i.row()].current_value(id); })) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user