]> git.saurik.com Git - wxWidgets.git/commitdiff
restored expanders
authorRobert Roebling <robert@roebling.de>
Mon, 27 Aug 2007 08:35:26 +0000 (08:35 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 27 Aug 2007 08:35:26 +0000 (08:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index 936dc0f16470ff6ecf449ea7642f95ded9a15fc0..aa1a08a028dc99eb6f14f833752aa884d37ff61f 100644 (file)
@@ -2301,6 +2301,13 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         }
     }
 
+    wxDataViewColumn *expander = GetOwner()->GetExpanderColumn();
+    if (!expander)
+    {
+        // TODO: last column for RTL support
+        expander = GetOwner()->GetColumn( 0 );
+    }
+        
     // redraw all cells for all rows which must be repainted and for all columns
     wxRect cell_rect;
     cell_rect.x = x_start;
@@ -2314,6 +2321,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         if (col->IsHidden())
             continue;       // skipt it!
 
+        
         for (unsigned int item = item_start; item < item_last; item++)
         {
             // get the cell value and set it into the renderer
@@ -2333,7 +2341,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
             //Draw the expander here.
             int indent = node->GetIndentLevel();
-            if( col == GetOwner()->GetExpanderColumn() )
+            if( col == expander )
             {
                 //Calculate the indent first
                 indent = cell_rect.x + GetOwner()->GetIndent() * indent;