image_x = 3 + ix + IMAGE_MARGIN_IN_REPORT_MODE;
}
}
-
+
wxRect rect;
rect.x = HEADER_OFFSET_X;
rect.y = GetLineY(line);
wxRect label = GetLineLabelRect( current );
if (label.Contains( x, y ))
m_renameTimer->Start( 250, true );
-
+
}
else
m_renameTimer->Start( 250, true );
else // !shift
{
// all previously selected items are unselected unless ctrl is held
- if ( !event.ControlDown() )
+ // in a multiselection control
+ if ( !event.ControlDown() || IsSingleSel() )
HighlightAll(false);
ChangeCurrent(newCurrent);
// refresh the old focus to remove it
RefreshLine( oldCurrent );
- if ( !event.ControlDown() )
- {
+ // in single selection mode we must always have a selected item
+ if ( !event.ControlDown() || IsSingleSel() )
HighlightLine( m_current, true );
- }
}
RefreshLine( m_current );
case WXK_SPACE:
if ( IsSingleSel() )
{
- SendNotify( m_current, wxEVT_COMMAND_LIST_ITEM_ACTIVATED );
-
- if ( IsHighlighted(m_current) )
+ if ( event.ControlDown() )
+ {
+ ReverseHighlight(m_current);
+ }
+ else // normal space press
{
- // don't unselect the item in single selection mode
- break;
+ SendNotify( m_current, wxEVT_COMMAND_LIST_ITEM_ACTIVATED );
}
- //else: select it in ReverseHighlight() below if unselected
}
-
- ReverseHighlight(m_current);
+ else // multiple selection
+ {
+ ReverseHighlight(m_current);
+ }
break;
case WXK_RETURN:
// update our idea of which lines are shown when we redraw the window the
// next time
ResetVisibleLinesRange();
-
+
if ( event.GetOrientation() == wxHORIZONTAL && HasHeader() )
{
wxGenericListCtrl* lc = GetListCtrl();