Only draw cell in selected style when control has focus

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-10-20 10:43:57 +00:00
parent 4cda739ce4
commit 816964cfd8

View 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