From d283f8d85fa2b70d6d517fd79f8b9f10986d1e75 Mon Sep 17 00:00:00 2001 From: Glorf Date: Mon, 29 Apr 2013 21:19:13 +0200 Subject: [PATCH] Bugfix #748 --- apps/openmw/mwgui/console.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index 463c645dc..cba3412e9 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -397,11 +397,24 @@ namespace MWGui void Console::setSelectedObject(const MWWorld::Ptr& object) { - mPtr = object; - if (!mPtr.isEmpty()) - setTitle("#{sConsoleTitle} (" + mPtr.getCellRef().mRefID + ")"); + if (!object.isEmpty()) + { + if (object == mPtr) + { + setTitle("#{sConsoleTitle}"); + mPtr=MWWorld::Ptr(); + } + else + { + setTitle("#{sConsoleTitle} (" + object.getCellRef().mRefID + ")"); + mPtr = object; + } + } else + { setTitle("#{sConsoleTitle}"); + mPtr = MWWorld::Ptr(); + } MyGUI::InputManager::getInstance().setKeyFocusWidget(command); }