fixed bug with redoing the command when there was nothing to redo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -154,12 +154,17 @@ bool wxCommandProcessor::Redo()
|
|||||||
{
|
{
|
||||||
wxCommand *redoCommand = (wxCommand *) NULL;
|
wxCommand *redoCommand = (wxCommand *) NULL;
|
||||||
wxNode *redoNode = (wxNode *) NULL;
|
wxNode *redoNode = (wxNode *) NULL;
|
||||||
if (m_currentCommand && m_currentCommand->Next())
|
|
||||||
|
if ( m_currentCommand )
|
||||||
{
|
{
|
||||||
redoCommand = (wxCommand *)m_currentCommand->Next()->Data();
|
// is there anything to redo?
|
||||||
redoNode = m_currentCommand->Next();
|
if ( m_currentCommand->Next() )
|
||||||
|
{
|
||||||
|
redoCommand = (wxCommand *)m_currentCommand->Next()->Data();
|
||||||
|
redoNode = m_currentCommand->Next();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else // no current command, redo the first one
|
||||||
{
|
{
|
||||||
if (m_commands.Number() > 0)
|
if (m_commands.Number() > 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user