reduce flicker in header window when deleting items and let space select items even in single selection mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,9 +9,10 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/*
|
/*
|
||||||
TODO for better virtual list control support:
|
TODO
|
||||||
|
|
||||||
1. we need to implement searching/sorting somehow
|
1. we need to implement searching/sorting for virtual controls somehow
|
||||||
|
2. when changing selection the lines are refreshed twice
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -3172,11 +3173,16 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
|||||||
le.m_itemIndex = m_current;
|
le.m_itemIndex = m_current;
|
||||||
GetLine(m_current)->GetItem( 0, le.m_item );
|
GetLine(m_current)->GetItem( 0, le.m_item );
|
||||||
GetParent()->GetEventHandler()->ProcessEvent( le );
|
GetParent()->GetEventHandler()->ProcessEvent( le );
|
||||||
}
|
|
||||||
else
|
if ( IsHighlighted(m_current) )
|
||||||
{
|
{
|
||||||
ReverseHighlight(m_current);
|
// don't unselect the item in single selection mode
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
//else: select it in ReverseHighlight() below if unselected
|
||||||
|
}
|
||||||
|
|
||||||
|
ReverseHighlight(m_current);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_RETURN:
|
case WXK_RETURN:
|
||||||
@@ -3798,7 +3804,7 @@ void wxListMainWindow::RefreshAll()
|
|||||||
Refresh();
|
Refresh();
|
||||||
|
|
||||||
wxListHeaderWindow *headerWin = GetListCtrl()->m_headerWin;
|
wxListHeaderWindow *headerWin = GetListCtrl()->m_headerWin;
|
||||||
if ( headerWin )
|
if ( headerWin && headerWin->m_dirty )
|
||||||
{
|
{
|
||||||
headerWin->m_dirty = FALSE;
|
headerWin->m_dirty = FALSE;
|
||||||
headerWin->Refresh();
|
headerWin->Refresh();
|
||||||
@@ -3898,6 +3904,7 @@ void wxListMainWindow::DeleteItem( long lindex )
|
|||||||
m_lines.RemoveAt( index );
|
m_lines.RemoveAt( index );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we need to refresh the (vert) scrollbar as the number of items changed
|
||||||
m_dirty = TRUE;
|
m_dirty = TRUE;
|
||||||
|
|
||||||
SendNotify( index, wxEVT_COMMAND_LIST_DELETE_ITEM );
|
SendNotify( index, wxEVT_COMMAND_LIST_DELETE_ITEM );
|
||||||
|
Reference in New Issue
Block a user