Bug 391614 - Inconsistent selection state after save
Summary: Inconsistent selection state after save
Status: RESOLVED FIXED
Alias: None
Product: tellico
Classification: Applications
Component: general (show other bugs)
Version: 3.1.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Robby Stephenson
URL:
Keywords:
: 392382 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-03-09 14:39 UTC by chp321
Modified: 2019-10-20 17:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.2.1


Attachments
9 screenshots which describe the bug (546.18 KB, application/gzip)
2018-03-09 14:39 UTC, chp321
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chp321 2018-03-09 14:39:22 UTC
Created attachment 111279 [details]
9 screenshots which describe the bug

When the second entry test2 has been updated, and the database saved, this entry remains selected, and it is impossible to delete, or to edit, and even to add, a single entry, as test2 remains selected.
See the chronological screenshots in attachment.
Impossible to de-select test2.
This bug appeared with version 3.1.1, it was OK in 3.1.
Unfortunately, I cannot downgrade to 3.1, due to dependencies.
The only way to solve this problem, is to shut tellico and re-open it, beetween each edit of an entry.
Comment 1 Robby Stephenson 2018-03-18 22:26:41 UTC
Git commit 406b3cd1655fa053b822a9914ad978e55d0dc3ee by Robby Stephenson.
Committed on 18/03/2018 at 22:23.
Pushed by rstephenson into branch '3.1'.

Clear the selection when the model is reset

Per Qt documentation, reseting a model does not signal a change in the
selection. Connect the primary selection proxy model to the
modelAboutToBeReset signal to catch the selection change.

This was an existing bug in versions prior to 3.1.1 but did not
manifest since a QSet was use to track selected entries and duplicates
were automatically prevented. Once a QList was used to retain the
selection ordering, the bug showed up.
FIXED-IN: 3.1.2

M  +1    -0    src/controller.cpp
M  +3    -0    src/mainwindow.cpp
M  +6    -1    src/models/entryselectionmodel.cpp
M  +1    -0    src/models/entryselectionmodel.h
M  +58   -0    src/tests/tellicomodeltest.cpp
M  +1    -0    src/tests/tellicomodeltest.h

https://commits.kde.org/tellico/406b3cd1655fa053b822a9914ad978e55d0dc3ee
Comment 2 Tomasz Goliński 2018-04-16 14:17:08 UTC
I think something is still broken. I got the same problem with 3.1.2 (even without saving the database). However I cannot reproduce it consistently yet.

I also managed to observe a problem where it was impossible to select anything, selection was all the time empty. That happened after saving a database and that time Tellico didn't clear bold from all updated entries.
Comment 3 Robby Stephenson 2018-05-25 01:02:23 UTC
*** Bug 392382 has been marked as a duplicate of this bug. ***
Comment 4 Tomasz Goliński 2018-09-26 14:43:49 UTC
I think I can reproduce this problem in the following way:

1. Edit an entry
2. Chose another entry without saving the previous one first
3. Dialog pops up asking you to chose what to do. Chose "Save entry".

After that Tellico exhibits the problem - the second entry becomes permanently and transparently selected. If I save modifications to the entry manually, the bug doesn't trigger.
Comment 5 Tomasz Goliński 2019-03-11 17:32:24 UTC
The problem is still there with Tellico-3.1.4.
Comment 6 Robby Stephenson 2019-07-07 10:38:13 UTC
Git commit f6d89101ff95cebeb6772f7ecebd084f5b7c6b2f by Robby Stephenson.
Committed on 06/07/2019 at 23:31.
Pushed by rstephenson into branch '3.2'.

Fix selection bug when modifying an entry after selection changes

Leftover from before the change to a selection model approach, the
DetailedListView had a vestigial boolean to determine when to change
the selection when adding or modifying an entry. Remove it completely.
FIXED-IN: 3.2.1

M  +4    -0    ChangeLog
M  +1    -7    src/detailedlistview.cpp
M  +0    -1    src/detailedlistview.h
M  +2    -2    src/entryeditdialog.cpp
M  +1    -1    src/entryeditdialog.h
M  +6    -6    src/mainwindow.cpp
M  +1    -0    src/models/entryselectionmodel.cpp

https://commits.kde.org/tellico/f6d89101ff95cebeb6772f7ecebd084f5b7c6b2f
Comment 7 Robby Stephenson 2019-10-20 17:53:19 UTC
Git commit 24f55565c091c25130f799bd0a4955ad2bd520d8 by Robby Stephenson.
Committed on 20/10/2019 at 17:50.
Pushed by rstephenson into branch '3.2'.

Automatically select newly added entries

Reverts some regression in behavior in Bug 391614. This selects newly
added entries for all widgets that use the selection view, but (for the
moment) only scrolls to the selection in DetailedListView.
Related: bug 413217
FIXED-IN: 3.2.2

M  +8    -0    ChangeLog
M  +1    -0    src/controller.cpp
M  +3    -0    src/detailedlistview.cpp

https://commits.kde.org/tellico/24f55565c091c25130f799bd0a4955ad2bd520d8