]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/caret.cpp
simplifications and corrections to background drawing:
[wxWidgets.git] / src / generic / caret.cpp
index 03040e1742e8efd0b505dc0e91da794744b2074f..08dd83006822b8f6fd3b5d479638afe4bab605d3 100644 (file)
@@ -150,6 +150,23 @@ void wxCaret::DoMove()
     //else: will be shown at the correct location when it is shown
 }
 
+void wxCaret::DoSize()
+{
+    int countVisible = m_countVisible;
+    if (countVisible > 0)
+    {
+        m_countVisible = 0;
+        DoHide();
+    }
+    // Change bitmap size
+    m_bmpUnderCaret = wxBitmap(m_width, m_height);
+    if (countVisible > 0)
+    {
+        m_countVisible = countVisible;
+        DoShow();
+    }
+}
+
 // ----------------------------------------------------------------------------
 // handling the focus
 // ----------------------------------------------------------------------------