Skip to content

#14274 Fix invalid index range in dataChanged() from table row editor#14342

Open
kriben wants to merge 1 commit into
devfrom
14274-fix-invalid-datachanged-index-range
Open

#14274 Fix invalid index range in dataChanged() from table row editor#14342
kriben wants to merge 1 commit into
devfrom
14274-fix-invalid-datachanged-index-range

Conversation

@kriben

@kriben kriben commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Valid Qt column indices are 0..columnCount()-1, but the bottom-right model index was constructed with column columnCount(). Since QAbstractItemModel::index() validates its arguments, this produced an invalid QModelIndex(-1,-1) passed to dataChanged(), causing a console warning on every table row update, e.g. when adding or moving 3D well path pick targets. Fix the same off-by-one in modelIndexFromPdmObject().

Fixes #14274.

Valid Qt column indices are 0..columnCount()-1, but the bottom-right
model index was constructed with column columnCount(). Since
QAbstractItemModel::index() validates its arguments, this produced an
invalid QModelIndex(-1,-1) passed to dataChanged(), causing a console
warning on every table row update, e.g. when adding or moving 3D well
path pick targets. Fix the same off-by-one in modelIndexFromPdmObject().

Fixes #14274.
@kriben
kriben requested a review from jonjenssen July 14, 2026 09:23
@kriben
kriben marked this pull request as ready for review July 14, 2026 09:23
@kriben

kriben commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

@jonjenssen I was not able to reproduce it on my machine, but I think this should fix it. Can you test when back from holiday?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console error when adding/moving 3d pick targets:

2 participants