fixed bug when the caret wasn't shown if it was hidden when the window got focus the last time

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-10-15 19:47:44 +00:00
parent 6dbe10e7a6
commit c80b9af4d7

View File

@@ -132,6 +132,17 @@ void wxCaret::DoShow()
wxASSERT_MSG( GetWindow(), wxT("caret without window cannot be shown") );
wxASSERT_MSG( IsOk(), wxT("caret of zero size cannot be shown") );
// we might not have created the caret yet if we had got the focus first
// and the caret was shown later - so do it now if we have the focus but
// not the caret
if ( !m_hasCaret && (wxWindow::FindFocus() == GetWindow()) )
{
if ( MSWCreateCaret() )
{
DoMove();
}
}
if ( m_hasCaret )
{
CALL_CARET_API(ShowCaret, (GetWinHwnd(GetWindow())));