From e8a97230f521b4c7e86eff62db8358ae042e7c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sun, 6 Oct 2013 09:52:55 +0200 Subject: [PATCH] comic vine loading view working --- YACReaderLibrary/comic_vine_dialog.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/YACReaderLibrary/comic_vine_dialog.cpp b/YACReaderLibrary/comic_vine_dialog.cpp index fff73fdb..c33ca73a 100644 --- a/YACReaderLibrary/comic_vine_dialog.cpp +++ b/YACReaderLibrary/comic_vine_dialog.cpp @@ -56,10 +56,11 @@ void ComicVineDialog::doLayout() void ComicVineDialog::doStackedWidgets() { + doLoading(); content->addWidget(seriesQuestion = new SeriesQuestion); content->addWidget(searchSingleComic = new SearchSingleComic); content->addWidget(searchVolume = new SearchVolume); - doLoading(); + } void ComicVineDialog::doConnections() @@ -99,6 +100,8 @@ void ComicVineDialog::setComics(const QList & comics) void ComicVineDialog::show() { + QDialog::show(); + currentIndex = 0; if(comics.length() == 1) @@ -106,7 +109,7 @@ void ComicVineDialog::show() ComicDB singleComic = comics[0]; QString title = singleComic.getTitleOrPath(); titleHeader->setSubTitle(title); - content->setCurrentWidget(searchSingleComic); + content->setCurrentIndex(0); comicVineClient->search(title); }else if(comics.length()>1) @@ -114,7 +117,7 @@ void ComicVineDialog::show() titleHeader->setSubTitle(tr("%1 comics selected").arg(comics.length())); content->setCurrentWidget(seriesQuestion); } - QDialog::show(); + } void ComicVineDialog::doLoading() @@ -136,7 +139,9 @@ void ComicVineDialog::doLoading() void ComicVineDialog::debugClientResults(const QString & string) { + content->setCurrentWidget(searchSingleComic); QMessageBox::information(0,"-Response-", string); + } //---------------------------------------