Use gdk_window_invalidate instead of gtk_widget_queue_draw as the latter doesn't e.g. invalidate a wxTreeCtrl correctly when place somewhere different from 0,0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2009-02-28 17:22:35 +00:00
parent 215e1b4736
commit ba86da30cf

View File

@ -3526,6 +3526,8 @@ bool wxWindowGTK::ScrollPages(int pages)
return DoScrollByUnits(ScrollDir_Vert, ScrollUnit_Page, pages);
}
#include "wx/treectrl.h"
void wxWindowGTK::Refresh(bool WXUNUSED(eraseBackground),
const wxRect *rect)
{
@ -3541,23 +3543,21 @@ void wxWindowGTK::Refresh(bool WXUNUSED(eraseBackground),
return;
if (rect == NULL)
gtk_widget_queue_draw(widget);
{
gdk_window_invalidate_rect( widget->window, NULL, TRUE );
}
else
{
int x = rect->x;
if (GetLayoutDirection() == wxLayout_RightToLeft)
x = GetClientSize().x - x - rect->width;
#if 0
gtk_widget_queue_draw_area(widget, x, rect->y, rect->width, rect->height);
#else
GdkRectangle r;
r.x = rect->x;
r.y = rect->y;
r.width = rect->width;
r.height = rect->height;
gdk_window_invalidate_rect( m_wxwindow->window, &r, TRUE );
#endif
}
}