summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
07763c9)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31646
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
switch ( event.m_keyCode )
{
case WXK_RETURN:
switch ( event.m_keyCode )
{
case WXK_RETURN:
- if ( AcceptChanges() )
- {
- // Close the text control, changes were accepted
- Finish();
- }
- // else do nothing, do not accept and do not close
+ // Notify the owner about the changes
+ AcceptChanges();
+
+ // Even if vetoed, close the control (consistent with MSW)
+ Finish();
}
else if (event.RightDown())
{
}
else if (event.RightDown())
{
+ // If the item is already selected, do not update the selection.
+ // Multi-selections should not be cleared if a selected item is clicked.
+ if (!IsHighlighted(current))
+ {
+ HighlightAll(false);
+ ChangeCurrent(current);
+ ReverseHighlight(m_current);
+ }
+
SendNotify( current, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,
event.GetPosition() );
}
SendNotify( current, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,
event.GetPosition() );
}