]> git.saurik.com Git - wxWidgets.git/commitdiff
Reinitialise wxDataViewCustomRenderer's DC every time
authorRobert Roebling <robert@roebling.de>
Wed, 21 Jan 2009 15:04:04 +0000 (15:04 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 21 Jan 2009 15:04:04 +0000 (15:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/dataview.cpp

index 58bdbbb501293a8bdf0e82d73c48a9a110be32da..0ee71bf7dde67c0a12e4b10fa65213972c42905c 100644 (file)
@@ -1105,11 +1105,10 @@ gtk_wx_cell_renderer_render (GtkCellRenderer      *renderer,
         wxRect renderrect( rect.x, rect.y, rect.width, rect.height );
         wxWindowDC* dc = (wxWindowDC*) cell->GetDC();
         wxWindowDCImpl *impl = (wxWindowDCImpl *) dc->GetImpl();
         wxRect renderrect( rect.x, rect.y, rect.width, rect.height );
         wxWindowDC* dc = (wxWindowDC*) cell->GetDC();
         wxWindowDCImpl *impl = (wxWindowDCImpl *) dc->GetImpl();
-        if (impl->m_gdkwindow == NULL)
-        {
-            impl->m_gdkwindow = window;
-            impl->SetUpDC();
-        }
+        // Reinitilise GDK window everytime as drawing can also
+        // be done into DnD drop window.
+        impl->m_gdkwindow = window;
+        impl->SetUpDC();
 
         int state = 0;
         if (flags & GTK_CELL_RENDERER_SELECTED)
 
         int state = 0;
         if (flags & GTK_CELL_RENDERER_SELECTED)