Fixed caret droppings left when scrolling

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-10-27 12:40:40 +00:00
parent d743254a40
commit 113faca13f

View File

@@ -4235,6 +4235,26 @@ void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy );
m_clipPaintRegion = false;
bool restoreCaret = (GetCaret() != NULL && GetCaret()->IsVisible());
if (restoreCaret)
{
wxRect caretRect(GetCaret()->GetPosition(), GetCaret()->GetSize());
if (dx > 0)
caretRect.width += dx;
else
{
caretRect.x += dx; caretRect.width -= dx;
}
if (dy > 0)
caretRect.height += dy;
else
{
caretRect.y += dy; caretRect.height -= dy;
}
RefreshRect(caretRect);
}
}
void wxWindowGTK::GtkScrolledWindowSetBorder(GtkWidget* w, int wxstyle)