void wxMenuItem::SetText( const wxString& string )
{
wxString str = string;
- if (str.IsEmpty())
+ if ( str.empty() && !IsSeparator() )
{
wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?"));
- str = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR|wxSTOCK_WITH_MNEMONIC);
+ str = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR |
+ wxSTOCK_WITH_MNEMONIC);
}
// Some optimization to avoid flicker
hotkey << wxT("Down" );
break;
case WXK_PAGEUP:
- hotkey << wxT("PgUp" );
+ hotkey << wxT("Page_Up" );
break;
case WXK_PAGEDOWN:
- hotkey << wxT("PgDn" );
+ hotkey << wxT("Page_Down" );
break;
case WXK_LEFT:
hotkey << wxT("Left" );
hotkey << wxT("KP_Down" );
break;
case WXK_NUMPAD_PAGEUP:
- hotkey << wxT("KP_PgUp" );
+ hotkey << wxT("KP_Page_Up" );
break;
case WXK_NUMPAD_PAGEDOWN:
- hotkey << wxT("KP_PgDn" );
+ hotkey << wxT("KP_Page_Down" );
break;
case WXK_NUMPAD_END:
hotkey << wxT("KP_End" );