]> git.saurik.com Git - wxWidgets.git/commitdiff
Only draw cell in selected style when control has focus
authorRobert Roebling <robert@roebling.de>
Sat, 20 Oct 2007 10:43:57 +0000 (10:43 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 20 Oct 2007 10:43:57 +0000 (10:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index 8c9cd033099b5110f0c4d8476c974f118676582c..325e8807da92391dfe54609c7c0457421bc62d40 100644 (file)
@@ -2462,7 +2462,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
             item_rect.x += indent;
 
             int state = 0;
-            if (m_selection.Index(item) != wxNOT_FOUND)
+            if (m_hasFocus && (m_selection.Index(item) != wxNOT_FOUND))
                 state |= wxDATAVIEW_CELL_SELECTED;
 
             // TODO: it would be much more efficient to create a clipping