From 391e299f7941480a9d1b278e961e46cfef075344 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Fri, 28 Mar 2014 20:08:59 -0500 Subject: [PATCH] Give an error message if a scrape is started with no games selected. --- src/guis/GuiScraperMulti.cpp | 2 ++ src/guis/GuiScraperStart.cpp | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/guis/GuiScraperMulti.cpp b/src/guis/GuiScraperMulti.cpp index 068e5a284..44e46b8c2 100644 --- a/src/guis/GuiScraperMulti.cpp +++ b/src/guis/GuiScraperMulti.cpp @@ -14,6 +14,8 @@ GuiScraperMulti::GuiScraperMulti(Window* window, const std::queue searches = getSearches(mSystems->getSelectedObjects(), mFilters->getSelected()); - GuiScraperMulti* gsm = new GuiScraperMulti(mWindow, searches, mApproveResults->getState()); - mWindow->pushGui(gsm); - delete this; + if(searches.empty()) + { + mWindow->pushGui(new GuiMsgBox(mWindow, + "NO GAMES FIT THAT CRITERIA.")); + }else{ + GuiScraperMulti* gsm = new GuiScraperMulti(mWindow, searches, mApproveResults->getState()); + mWindow->pushGui(gsm); + delete this; + } } std::queue GuiScraperStart::getSearches(std::vector systems, GameFilterFunc selector)