SetSelection() in wxNotebook now sets the focus,
SPACE in wxListCtrl now sends Activate in multiple sel mode git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2077,8 +2077,19 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
||||
}
|
||||
case WXK_SPACE:
|
||||
{
|
||||
m_current->ReverseHilight();
|
||||
RefreshLine( m_current );
|
||||
if (m_mode & wxLC_SINGLE_SEL)
|
||||
{
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, GetParent()->GetId() );
|
||||
le.SetEventObject( GetParent() );
|
||||
le.m_itemIndex = GetIndexOfLine( m_current );
|
||||
m_current->GetItem( 0, le.m_item );
|
||||
GetParent()->GetEventHandler()->ProcessEvent( le );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_current->ReverseHilight();
|
||||
RefreshLine( m_current );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WXK_INSERT:
|
||||
|
||||
@@ -357,6 +357,10 @@ int wxNotebook::SetSelection( int page )
|
||||
int selOld = GetSelection();
|
||||
|
||||
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page );
|
||||
|
||||
wxGtkNotebookPage* g_page = GetNotebookPage( page );
|
||||
if (g_page->m_client)
|
||||
g_page->m_client->SetFocus();
|
||||
|
||||
return selOld;
|
||||
}
|
||||
|
||||
@@ -357,6 +357,10 @@ int wxNotebook::SetSelection( int page )
|
||||
int selOld = GetSelection();
|
||||
|
||||
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page );
|
||||
|
||||
wxGtkNotebookPage* g_page = GetNotebookPage( page );
|
||||
if (g_page->m_client)
|
||||
g_page->m_client->SetFocus();
|
||||
|
||||
return selOld;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user