From c3dbcae5867fab84e18b77674ec22979b45c5f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Wed, 20 May 2015 17:58:24 +0200 Subject: [PATCH] fixed bug in Comic Vine scraper causing a crash when sorting comics on a an empty selection --- YACReaderLibrary/comic_vine/sort_volume_comics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/YACReaderLibrary/comic_vine/sort_volume_comics.cpp b/YACReaderLibrary/comic_vine/sort_volume_comics.cpp index 6d7441f2..16e7d782 100644 --- a/YACReaderLibrary/comic_vine/sort_volume_comics.cpp +++ b/YACReaderLibrary/comic_vine/sort_volume_comics.cpp @@ -169,10 +169,12 @@ void SortVolumeComics::moveDownCL() QList selection = tableFiles->selectionModel()->selectedIndexes(); if(selection.count() > 0) + { localComicsModel->moveSelectionDown(selection); - selection = tableFiles->selectionModel()->selectedIndexes(); - tableFiles->scrollTo(selection.last()); + selection = tableFiles->selectionModel()->selectedIndexes(); + tableFiles->scrollTo(selection.last()); + } } void SortVolumeComics::moveUpIL()