From 33ef923235aeabd07308816bb07ef790cc6c1024 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 31 Jul 2014 23:20:54 +0300 Subject: Move popup related code from viewport into popupManager. --- src/game.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index f5b146a99..4e2977232 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -53,6 +53,7 @@ #include "gui/chatconsts.h" #include "gui/dialogsmanager.h" #include "gui/gui.h" +#include "gui/popupmanager.h" #include "gui/viewport.h" #include "gui/windowmanager.h" #include "gui/windowmenu.h" @@ -965,8 +966,11 @@ void Game::changeMap(const std::string &mapPath) ResourceManager *const resman = ResourceManager::getInstance(); resman->cleanProtected(); - if (viewport) - viewport->clearPopup(); + if (popupManager) + { + popupManager->clearPopup(); + popupManager->closePopupMenu(); + } // Clean up floor items, beings and particles if (actorManager) @@ -975,10 +979,7 @@ void Game::changeMap(const std::string &mapPath) // Close the popup menu on map change so that invalid options can't be // executed. if (viewport) - { - viewport->closePopupMenu(); viewport->cleanHoverItems(); - } // Unset the map of the player so that its particles are cleared before // being deleted in the next step -- cgit v1.2.3-60-g2f50