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:
@@ -132,6 +132,17 @@ void wxCaret::DoShow()
|
|||||||
wxASSERT_MSG( GetWindow(), wxT("caret without window cannot be shown") );
|
wxASSERT_MSG( GetWindow(), wxT("caret without window cannot be shown") );
|
||||||
wxASSERT_MSG( IsOk(), wxT("caret of zero size 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 )
|
if ( m_hasCaret )
|
||||||
{
|
{
|
||||||
CALL_CARET_API(ShowCaret, (GetWinHwnd(GetWindow())));
|
CALL_CARET_API(ShowCaret, (GetWinHwnd(GetWindow())));
|
||||||
|
Reference in New Issue
Block a user