mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore: Fixed issue with destroying TopWindow
git-svn-id: svn://ultimatepp.org/upp/trunk@11259 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3d9d163fc4
commit
2d4e9b2dc7
3 changed files with 30 additions and 0 deletions
|
|
@ -605,6 +605,33 @@ void LocalProcess::CloseWrite()
|
|||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
int LocalProcess::Finish(String& out)
|
||||
{
|
||||
out.Clear();
|
||||
while(IsRunning()) {
|
||||
String h = Get();
|
||||
// if(IsNull(h))
|
||||
// Sleep(1); // p.Wait would be much better here!
|
||||
// else
|
||||
out.Cat(h);
|
||||
Sleep(1); // p.Wait would be much better here!
|
||||
}
|
||||
|
||||
LLOG("Finish: About to read the rest of output");
|
||||
|
||||
for(;;) {
|
||||
String h = Get();
|
||||
// DDUMP(h.GetCount());
|
||||
// DDUMP(h.IsVoid());
|
||||
if(h.IsVoid())
|
||||
break;
|
||||
out.Cat(h);
|
||||
}
|
||||
return GetExitCode();
|
||||
}
|
||||
*/
|
||||
|
||||
int LocalProcess::Finish(String& out)
|
||||
{
|
||||
out.Clear();
|
||||
|
|
|
|||
|
|
@ -139,6 +139,8 @@ Size Ctrl::GetMaxSize() const
|
|||
void Ctrl::SyncLayout(int force)
|
||||
{
|
||||
GuiLock __;
|
||||
if(destroying)
|
||||
return;
|
||||
LLOG("SyncLayout " << Name() << " size: " << GetSize());
|
||||
bool refresh = false;
|
||||
Rect oview = GetView();
|
||||
|
|
|
|||
|
|
@ -507,6 +507,7 @@ TopWindow::TopWindow()
|
|||
TopWindow::~TopWindow()
|
||||
{
|
||||
GuiLock __;
|
||||
destroying = true;
|
||||
if(InLoop())
|
||||
EndLoop(IDOK);
|
||||
if(!IsChild())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue