// if we had disabled other app windows, reenable them back now because
// if they stay disabled Windows will activate another window (one
// which is enabled, anyhow) and we will lose activation
- if ( m_windowDisabler )
- {
- delete m_windowDisabler;
- m_windowDisabler = NULL;
- }
+ wxDELETE(m_windowDisabler);
if ( IsModal() )
EndModal(wxID_CANCEL);
// use the apps top level window as parent if none given unless explicitly
// forbidden
- if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) )
+ wxWindow * const parent = GetParentForModalDialog();
+ if ( parent && parent != this )
{
- wxWindow * const parent = GetParentForModalDialog();
- if ( parent && parent != this )
- {
- m_parent = parent;
- }
+ m_parent = parent;
}
Show(true);