Turtle: Fixed issue with focus on WndDestroy #682

git-svn-id: svn://ultimatepp.org/upp/trunk@6890 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-02-09 17:13:19 +00:00
parent 7f19ef2320
commit 95864c6653
2 changed files with 3 additions and 10 deletions

View file

@ -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

View file

@ -274,8 +274,9 @@ void Ctrl::DestroyWnd()
void Ctrl::WndDestroy()
{
bool focus = HasFocusDeep();
DestroyWnd();
if(topctrl.GetCount())
if(focus && topctrl.GetCount())
topctrl.Top()->ActivateWnd();
}