Make wxRenderer::DrawItemSelectionRect() draw a focus outline of wxCONTROL_CURRENT and wxCONTROL_FOCUSED is given, blind patch for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2351,7 +2351,6 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
x, item_last * m_lineHeight);
|
||||
}
|
||||
|
||||
bool has_focus = (FindFocus() == this);
|
||||
// redraw the background for the items which are selected/current
|
||||
for (unsigned int item = item_start; item < item_last; item++)
|
||||
{
|
||||
@@ -2359,7 +2358,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
if (selected || item == m_currentRow)
|
||||
{
|
||||
int flags = selected ? (int)wxCONTROL_SELECTED : 0;
|
||||
if ((item == m_currentRow) && has_focus)
|
||||
if (item == m_currentRow)
|
||||
flags |= wxCONTROL_CURRENT;
|
||||
if (m_hasFocus)
|
||||
flags |= wxCONTROL_FOCUSED;
|
||||
|
Reference in New Issue
Block a user