diff --git a/YACReaderLibrary/comic_vine/comic_vine_dialog.cpp b/YACReaderLibrary/comic_vine/comic_vine_dialog.cpp index 965f6870..c6137179 100644 --- a/YACReaderLibrary/comic_vine/comic_vine_dialog.cpp +++ b/YACReaderLibrary/comic_vine/comic_vine_dialog.cpp @@ -73,6 +73,8 @@ void ComicVineDialog::doLayout() setLayout(mainLayout); setFixedSize(872,529); + + setWindowTitle("Comic Vine Scraper (beta)"); } void ComicVineDialog::doStackedWidgets() @@ -145,6 +147,9 @@ void ComicVineDialog::goBack() else showSearchSingleComic(); break; + case SortingComics: + showSelectVolume(); + break; default: break; } @@ -265,6 +270,12 @@ void ComicVineDialog::showSearchVolume() } void ComicVineDialog::showSelectVolume(const QString & json) +{ + showSelectVolume(); + selectVolumeWidget->load(json); +} + +void ComicVineDialog::showSelectVolume() { status = SelectingSeries; @@ -274,8 +285,6 @@ void ComicVineDialog::showSelectVolume(const QString & json) nextButton->setVisible(true); searchButton->setHidden(true); closeButton->setVisible(true); - - selectVolumeWidget->load(json); } void ComicVineDialog::showSelectComic(const QString &json) @@ -286,8 +295,16 @@ void ComicVineDialog::showSelectComic(const QString &json) void ComicVineDialog::showSortVolumeComics(const QString &json) { + status = SortingComics; + content->setCurrentWidget(sortVolumeComicsWidget); + sortVolumeComicsWidget->setData(comics, json); + + backButton->setVisible(true); + nextButton->setVisible(true); + searchButton->setHidden(true); + closeButton->setVisible(true); } void ComicVineDialog::showLoading() diff --git a/YACReaderLibrary/comic_vine/comic_vine_dialog.h b/YACReaderLibrary/comic_vine/comic_vine_dialog.h index b97618a8..f3362e20 100644 --- a/YACReaderLibrary/comic_vine/comic_vine_dialog.h +++ b/YACReaderLibrary/comic_vine/comic_vine_dialog.h @@ -47,6 +47,7 @@ protected slots: void launchSearchVolume(); void launchSearchComic(); void showSelectVolume(const QString & json); + void showSelectVolume(); void showSelectComic(const QString & json); void showSortVolumeComics(const QString & json); private: @@ -65,7 +66,8 @@ private: SelectingComic, SelectingSeries, SearchingSingleComic, - SearchingVolume + SearchingVolume, + SortingComics }; ScraperMode mode; diff --git a/YACReaderLibrary/comic_vine/select_volume.cpp b/YACReaderLibrary/comic_vine/select_volume.cpp index bc14dfa2..de4c560b 100644 --- a/YACReaderLibrary/comic_vine/select_volume.cpp +++ b/YACReaderLibrary/comic_vine/select_volume.cpp @@ -103,8 +103,8 @@ void SelectVolume::load(const QString & json) if(model != 0) delete model; - else - model = tempM; + + model = tempM; if(model->rowCount()>0) {