wxString m_startValue;
size_t m_itemEdited;
bool m_finished;
+ bool m_aboutToFinish;
DECLARE_EVENT_TABLE()
};
{
m_owner = owner;
m_finished = false;
+ m_aboutToFinish = false;
wxRect rectLabel = owner->GetLineLabelRect(itemEdit);
switch ( event.m_keyCode )
{
case WXK_RETURN:
+ m_aboutToFinish = true;
// Notify the owner about the changes
AcceptChanges();
-
// Even if vetoed, close the control (consistent with MSW)
Finish();
-
break;
case WXK_ESCAPE:
}
// We must let the native text control handle focus, too, otherwise
- // it could have problems with the cursor (e.g., in wxGTK):
+ // it could have problems with the cursor (e.g., in wxGTK).
event.Skip();
}
size_t oldCurrent = m_current;
bool cmdModifierDown = event.CmdDown();
- if ( !(cmdModifierDown || event.ShiftDown()) )
+ if ( IsSingleSel() || !(cmdModifierDown || event.ShiftDown()) )
{
if( IsSingleSel() || !IsHighlighted(current) )
{