Skip to content

Commit

Permalink
Fix: Allow key changes for objects and array values.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-daveb committed May 6, 2024
1 parent cd6fac3 commit 3cbc48e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions QJsonModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ Qt::ItemFlags QJsonModel::flags(const QModelIndex& index) const

auto result = QAbstractItemModel::flags(index);

if (!isArray && !isObject) {
if (column == kKeyColumn) {
if (this->editMode & FieldPermissions::WritableKey) {
result = result | Qt::ItemIsEditable;
}
if (column == kKeyColumn) {
if (this->editMode & FieldPermissions::WritableKey) {
result = result | Qt::ItemIsEditable;
}
}
if (!isArray && !isObject) {
if (column == kValueColumn) {
if (this->editMode & FieldPermissions::WritableValue) {
result = result | Qt::ItemIsEditable;
Expand Down

0 comments on commit 3cbc48e

Please sign in to comment.