Don't reset source model each time pageListModel is requested
ClosedPublic

Authored by ervin on Dec 20 2015, 6:03 PM.

Details

Summary

Reasons for this fix:

  1. this was clearly dumb logic;
  2. this is why we see the available pages collapse when we try to move

items using the quick move.

For (2) the following was happening:

  • in ApplicationComponents::onMoveItemsRequested we requested the pageListModel property;
  • in Available*PagesModel::pageListModel we set the model on the sort proxy each time;
  • the sort proxy didn't check we didn't really change the model (I'd argue that's a bug in QSortFilterProxyModel to be honest);
  • since it thought the model changed, it issued a modelReset() signal;
  • the tree view in AvailablePagesView subsequently collapsed everything (which makes sense at that point).

Diff Detail

Repository
R4 Zanshin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ervin updated this revision to Diff 1565.Dec 20 2015, 6:03 PM
ervin retitled this revision from to Don't reset source model each time pageListModel is requested.
ervin updated this object.
ervin edited the test plan for this revision. (Show Details)
ervin added reviewers: bensi, franckarrecot.
bensi accepted this revision.Dec 22 2015, 9:48 AM
bensi edited edge metadata.
This revision is now accepted and ready to land.Dec 22 2015, 9:48 AM
This revision was automatically updated to reflect the committed changes.