wxWindow::Freeze()/Thaw() can now be nested
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c040ce40a2
commit
a1037371af
@ -74,6 +74,13 @@ versions, please update your code to not use them.
|
|||||||
OTHER CHANGES
|
OTHER CHANGES
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
2.5.2
|
||||||
|
-----
|
||||||
|
|
||||||
|
wxMSW:
|
||||||
|
- wxWindow::Freeze()/Thaw() can now be nested
|
||||||
|
|
||||||
|
|
||||||
2.5.1
|
2.5.1
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -463,6 +463,9 @@ private:
|
|||||||
// list of disabled children before last call to our Disable()
|
// list of disabled children before last call to our Disable()
|
||||||
wxWindowList *m_childrenDisabled;
|
wxWindowList *m_childrenDisabled;
|
||||||
|
|
||||||
|
// number of calls to Freeze() minus number of calls to Thaw()
|
||||||
|
unsigned int m_frozenness;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxWindowMSW)
|
DECLARE_DYNAMIC_CLASS(wxWindowMSW)
|
||||||
DECLARE_NO_COPY_CLASS(wxWindowMSW)
|
DECLARE_NO_COPY_CLASS(wxWindowMSW)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
@ -431,6 +431,7 @@ void wxWindowMSW::Init()
|
|||||||
m_lastKeydownProcessed = false;
|
m_lastKeydownProcessed = false;
|
||||||
|
|
||||||
m_childrenDisabled = NULL;
|
m_childrenDisabled = NULL;
|
||||||
|
m_frozenness = 0;
|
||||||
|
|
||||||
// wxWnd
|
// wxWnd
|
||||||
m_hMenu = 0;
|
m_hMenu = 0;
|
||||||
@ -1293,11 +1294,18 @@ static inline void SendSetRedraw(HWND hwnd, bool on)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMSW::Freeze()
|
void wxWindowMSW::Freeze()
|
||||||
|
{
|
||||||
|
if ( !m_frozenness++ )
|
||||||
{
|
{
|
||||||
SendSetRedraw(GetHwnd(), false);
|
SendSetRedraw(GetHwnd(), false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxWindowMSW::Thaw()
|
void wxWindowMSW::Thaw()
|
||||||
|
{
|
||||||
|
wxASSERT_MSG( m_frozenness > 0, _T("Thaw() without matching Freeze()") );
|
||||||
|
|
||||||
|
if ( !--m_frozenness )
|
||||||
{
|
{
|
||||||
SendSetRedraw(GetHwnd(), true);
|
SendSetRedraw(GetHwnd(), true);
|
||||||
|
|
||||||
@ -1305,6 +1313,7 @@ void wxWindowMSW::Thaw()
|
|||||||
// repainted
|
// repainted
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect)
|
void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user