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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user