git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2567
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxDefaultPosition, wxDefaultSize,
wxSUNKEN_BORDER )
{
+ m_text = (char *)NULL;
+
SetBackgroundColour(* wxWHITE);
m_font = *wxNORMAL_FONT;
m_xMargin = m_yMargin = 5;
m_caret.Move(m_xMargin, m_yMargin);
m_caret.Show();
-
- m_text = (char *)NULL;
}
MyCanvas::~MyCanvas()
void wxCaret::DoMove()
{
- wxASSERT_MSG( m_hasCaret, "cannot move non existent caret" );
-
- if ( !::SetCaretPos(m_x, m_y) )
+ if ( m_hasCaret )
{
- wxLogLastError("SetCaretPos");
+ if ( !::SetCaretPos(m_x, m_y) )
+ {
+ wxLogLastError("SetCaretPos");
+ }
}
+ //else: we don't have caret right now, nothing to do (this does happen)
}