Repository navigation
Fix crash when Tab is pressed at the last cell of a view's grid - #1289
Merged
Merged
Conversation
The crash is avoided if the table model is not editable, since insertRows checks that. A table model for a DB view should be not editable, so this fix avoids the crash and possibly other possible misbehaviours.
Closed
4 of 14 tasks
Member
|
Good catch. Definitely a @MKleusberg thing for reviewing though, even though it's super simple. 😄 |
Member
|
Thanks, @mgrojo, good catch! 😃 This looks like the correct way to fix this with no side-effects. For #141 we will need a different approach than just reverting back. Actually view editing is already partly implemented and relies on the "Pseudo PK" setting (named like that for lack of a better term) in the SqliteTableModel class. So if the isEditable() function is called for a view, we need to check if there is a pseudo-PK before returning true. But I will just merge this PR now and add the view bits in a second 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The crash is avoided if the table model is not editable, since insertRows
checks that. A table model for a DB view should be not editable, so this
fix avoids the crash and possibly other possible misbehaviours.
I open this pull request: