#if wxUSE_MENUS
m_commandEditMenu = (wxMenu *) NULL;
#endif // wxUSE_MENUS
m_undoAccelerator = wxT("\tCtrl+Z");
m_redoAccelerator = wxT("\tCtrl+Y");
#if wxUSE_MENUS
m_commandEditMenu = (wxMenu *) NULL;
#endif // wxUSE_MENUS
m_undoAccelerator = wxT("\tCtrl+Z");
m_redoAccelerator = wxT("\tCtrl+Y");
- wxNode *firstNode = m_commands.First();
- wxCommand *firstCommand = (wxCommand *)firstNode->Data();
+ wxList::compatibility_iterator firstNode = m_commands.GetFirst();
+ wxCommand *firstCommand = (wxCommand *)firstNode->GetData();
- wxNode *next = node->Next();
- delete (wxCommand *)node->Data();
- delete node;
+ wxList::compatibility_iterator next = node->GetNext();
+ delete (wxCommand *)node->GetData();
+ m_commands.Erase(node);
- redoCommand = (wxCommand *)m_currentCommand->Next()->Data();
- redoNode = m_currentCommand->Next();
+ redoCommand = (wxCommand *)m_currentCommand->GetNext()->GetData();
+ redoNode = m_currentCommand->GetNext();
wxString commandName(command->GetName());
if (commandName == wxT("")) commandName = _("Unnamed command");
bool canUndo = command->CanUndo();
wxString commandName(command->GetName());
if (commandName == wxT("")) commandName = _("Unnamed command");
bool canUndo = command->CanUndo();
wxString redoCommandName(redoCommand->GetName());
if (redoCommandName == wxT("")) redoCommandName = _("Unnamed command");
buf = wxString(_("&Redo ")) + redoCommandName + m_redoAccelerator;
wxString redoCommandName(redoCommand->GetName());
if (redoCommandName == wxT("")) redoCommandName = _("Unnamed command");
buf = wxString(_("&Redo ")) + redoCommandName + m_redoAccelerator;
{
// currentCommand is NULL but there are commands: this means that
// we've undone to the start of the list, but can redo the first.
{
// currentCommand is NULL but there are commands: this means that
// we've undone to the start of the list, but can redo the first.
wxString redoCommandName(redoCommand->GetName());
if (redoCommandName == wxT("")) redoCommandName = _("Unnamed command");
buf = wxString(_("&Redo ")) + redoCommandName + m_redoAccelerator;
wxString redoCommandName(redoCommand->GetName());
if (redoCommandName == wxT("")) redoCommandName = _("Unnamed command");
buf = wxString(_("&Redo ")) + redoCommandName + m_redoAccelerator;