feat: Warn for commands with duplicate triggers (#4322)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
askepticaldreamer
2024-03-17 04:46:58 -07:00
committed by GitHub
parent 0322d37650
commit 46c5609736
4 changed files with 102 additions and 11 deletions
+10
View File
@@ -165,12 +165,22 @@ public:
else
{
int vecRow = this->getVectorIndexFromModelIndex(row);
// TODO: This is only a safety-thing for when we modify data that's being modified right now.
// It should not be necessary, but it would require some rethinking about this surrounding logic
if (vecRow >= this->vector_->readOnly()->size())
{
return false;
}
this->vector_->removeAt(vecRow, this);
assert(this->rows_[row].original);
TVectorItem item = this->getItemFromRow(
this->rows_[row].items, this->rows_[row].original.value());
this->vector_->insert(item, vecRow, this);
QVector<int> roles = QVector<int>();
roles.append(role);
emit dataChanged(index, index, roles);
}
return true;