Revert "Hack wxMSW wxNotebook to show the text controls correctly initially."

This hack resulted in showing a black rectangle corresponding to the initial
size of the first notebook page when creating the notebook, as could be seen
in the notebook sample by pressing Alt+2,Alt+1 to recreate the notebook after
the startup.

If the bug that this hack was supposed to fix hasn't been fixed yet (and it
might have been by r73126, but it's hard to be sure as we don't have any test
case for that bug), we could reintroduce this call to Update() but only if
we're not inside a deferred resize (i.e. m_hDWP != 0) as it just can't work
correctly in this case.

This reverts r69793.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-01-04 21:58:59 +00:00
parent 010f3b466f
commit 6870e04cef
2 changed files with 0 additions and 19 deletions

View File

@@ -143,7 +143,6 @@ void wxNotebook::Init()
#if USE_NOTEBOOK_ANTIFLICKER
m_hasSubclassedUpdown = false;
m_doneUpdateHack = false;
#endif // USE_NOTEBOOK_ANTIFLICKER
}
@@ -1042,21 +1041,6 @@ void wxNotebook::OnSize(wxSizeEvent& event)
}
}
}
// Probably because of the games we play above to avoid flicker sometimes
// the text controls inside notebook pages are not shown correctly (they
// don't have their borders) when the notebook is shown for the first time.
// It's not really clear why does this happen and maybe the bug is in
// wxTextCtrl itself and not here but updating the page when it's about to
// be shown doesn't cost much and works around the problem so do it here
// for now.
if ( !m_doneUpdateHack && IsShownOnScreen() )
{
m_doneUpdateHack = true;
wxWindow* const page = GetCurrentPage();
if ( page )
page->Update();
}
#endif // USE_NOTEBOOK_ANTIFLICKER
event.Skip();