projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make wxGenericCollapsiblePane a wxControlContainer to allow keyboard navigation to...
[wxWidgets.git]
/
src
/
univ
/
dialog.cpp
diff --git
a/src/univ/dialog.cpp
b/src/univ/dialog.cpp
index 50fa18cacf695e125946afb6e7e58727a9f79129..c98a5e91ac581b5ac7ca314192e3992417e6d9de 100644
(file)
--- a/
src/univ/dialog.cpp
+++ b/
src/univ/dialog.cpp
@@
-53,6
+53,11
@@
void wxDialog::Init()
wxDialog::~wxDialog()
{
wxDialog::~wxDialog()
{
+ m_isBeingDeleted = true;
+
+ // if the dialog is modal, this will end its event loop
+ Show(false);
+
delete m_eventLoop;
}
delete m_eventLoop;
}
@@
-71,7
+76,7
@@
bool wxDialog::Create(wxWindow *parent,
void wxDialog::OnApply(wxCommandEvent &WXUNUSED(event))
{
void wxDialog::OnApply(wxCommandEvent &WXUNUSED(event))
{
- if ( Validate() )
+ if ( Validate() )
TransferDataFromWindow();
}
TransferDataFromWindow();
}
@@
-150,9
+155,12
@@
bool wxDialog::Show(bool show)
EndModal(wxID_CANCEL);
}
EndModal(wxID_CANCEL);
}
+ if (show && CanDoLayoutAdaptation())
+ DoLayoutAdaptation();
+
bool ret = wxDialogBase::Show(show);
bool ret = wxDialogBase::Show(show);
- if ( show )
+ if ( show )
InitDialog();
return ret;
InitDialog();
return ret;
@@
-175,7
+183,7
@@
int wxDialog::ShowModal()
// forbidden
if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) )
{
// forbidden
if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) )
{
- wxWindow *
parent = wxTheApp->GetTopWindow
();
+ wxWindow *
const parent = GetParentForModalDialog
();
if ( parent && parent != this )
{
m_parent = parent;
if ( parent && parent != this )
{
m_parent = parent;