Allow post_show to override a window's retval
This commit is contained in:
parent
89dd0e7f75
commit
099109a822
2 changed files with 8 additions and 0 deletions
|
@ -68,6 +68,9 @@ bool tdialog::show(CVideo& video, const unsigned auto_close_time)
|
|||
|
||||
post_show(*window);
|
||||
|
||||
// post_show may have updated the windoe retval. Update it here.
|
||||
retval_ = window->get_retval();
|
||||
|
||||
return retval_ == twindow::OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -425,6 +425,11 @@ public:
|
|||
close();
|
||||
}
|
||||
|
||||
int get_retval()
|
||||
{
|
||||
return retval_;
|
||||
}
|
||||
|
||||
void set_owner(tdialog* owner)
|
||||
{
|
||||
owner_ = owner;
|
||||
|
|
Loading…
Add table
Reference in a new issue