From 604d5ac00089a79e00541ab5a87cb4caec26619f Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 12 Jun 2014 21:46:23 +0200 Subject: [PATCH] Fix console reference label not resetting when loading save --- apps/openmw/mwgui/console.cpp | 6 ++++++ apps/openmw/mwgui/console.hpp | 2 ++ apps/openmw/mwgui/referenceinterface.hpp | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index 2ae4d6ed1..9f67524ae 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -435,4 +435,10 @@ namespace MWGui { setSelectedObject(MWWorld::Ptr()); } + + void Console::resetReference() + { + ReferenceInterface::resetReference(); + setSelectedObject(MWWorld::Ptr()); + } } diff --git a/apps/openmw/mwgui/console.hpp b/apps/openmw/mwgui/console.hpp index ec699b317..90da740c2 100644 --- a/apps/openmw/mwgui/console.hpp +++ b/apps/openmw/mwgui/console.hpp @@ -66,6 +66,8 @@ namespace MWGui void executeFile (const std::string& path); + virtual void resetReference (); + protected: virtual void onReferenceUnavailable(); diff --git a/apps/openmw/mwgui/referenceinterface.hpp b/apps/openmw/mwgui/referenceinterface.hpp index df53a42b7..0ba180de8 100644 --- a/apps/openmw/mwgui/referenceinterface.hpp +++ b/apps/openmw/mwgui/referenceinterface.hpp @@ -17,7 +17,7 @@ namespace MWGui void checkReferenceAvailable(); ///< closes the window, if the MW-reference has become unavailable - void resetReference() { mPtr = MWWorld::Ptr(); mCurrentPlayerCell = NULL; } + virtual void resetReference() { mPtr = MWWorld::Ptr(); mCurrentPlayerCell = NULL; } protected: virtual void onReferenceUnavailable() = 0; ///< called when reference has become unavailable