diff --git a/uppsrc/Turtle/Ctrl.cpp b/uppsrc/Turtle/Ctrl.cpp index d1d930c75..2daeb0588 100644 --- a/uppsrc/Turtle/Ctrl.cpp +++ b/uppsrc/Turtle/Ctrl.cpp @@ -65,15 +65,7 @@ void GuiPlatformAfterMenuPopUp() } String Ctrl::Name() const { - GuiLock __; -#ifdef CPU_64 - String s = String(typeid(*this).name()) + " : 0x" + FormatIntHex(this); -#else - String s = String(typeid(*this).name()) + " : " + Format("0x%x", (int) this); -#endif - if(IsChild()) - s << "(parent " << String(typeid(*parent).name()) << ")"; - return s; + return Name0(); } END_UPP_NAMESPACE diff --git a/uppsrc/Turtle/Wnd.cpp b/uppsrc/Turtle/Wnd.cpp index 180da8f8c..e037b417b 100644 --- a/uppsrc/Turtle/Wnd.cpp +++ b/uppsrc/Turtle/Wnd.cpp @@ -274,8 +274,9 @@ void Ctrl::DestroyWnd() void Ctrl::WndDestroy() { + bool focus = HasFocusDeep(); DestroyWnd(); - if(topctrl.GetCount()) + if(focus && topctrl.GetCount()) topctrl.Top()->ActivateWnd(); }