Skip to content

Commit

Permalink
Merge pull request #1 from ziembla/ziembla-mod
Browse files Browse the repository at this point in the history
Fix Model indexing in AlbumWidget::addPictures (chapter 4)
  • Loading branch information
GuillaumeLazar committed Jan 7, 2020
2 parents c8b5326 + 3ba5325 commit a52dbd1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Chapter04/gallery-desktop/AlbumWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ void AlbumWidget::addPictures()
Picture picture(filename);
lastModelIndex = mPictureModel->pictureModel()->addPicture(picture);
}
lastModelIndex = mPictureModel->index(lastModelIndex.row(), 0);
ui->thumbnailListView->setCurrentIndex(lastModelIndex);
}
}
Expand Down

0 comments on commit a52dbd1

Please sign in to comment.