When the currentIndex in the ImageViewer changed, updates the grid's currentIndex too
ClosedPublic

Authored by atulsharma on Jun 30 2017, 2:50 PM.

Details

Summary
  • Adds a new property view in the currentImage, that holds the current gridView so that it can change the gridView's currentIndex too

Diff Detail

Repository
R659 Koko Image Gallery
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
atulsharma created this revision.Jun 30 2017, 2:50 PM
mart added inline comments.Jun 30 2017, 3:03 PM
qmlUiKirigami/AlbumDelegate.qml
112 ↗(On Diff #16061)

this was ok

qmlUiKirigami/AlbumView.qml
44 ↗(On Diff #16061)

i don't think it should be binded there, as when the current page changes, the currentindex state would get lost

72 ↗(On Diff #16061)

rather than initializing it on component completed, that view should always be the view of the current page of the pageRow (that may also be *not* the last of the row)

qmlUiKirigami/main.qml
36

why do you initialize it to an empty gridview? it should either be empty or try to declaratively bind it as:

property GridView view: pagestack.currentPage.flickable

atulsharma updated this revision to Diff 16062.Jun 30 2017, 3:16 PM

Changes the way the view in the currentImage is initialized

atulsharma marked an inline comment as done.Jun 30 2017, 3:16 PM
mart accepted this revision.Jun 30 2017, 3:18 PM
This revision is now accepted and ready to land.Jun 30 2017, 3:18 PM
This revision was automatically updated to reflect the committed changes.