]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
Version 0.4 of wxPython for MSW.
[wxWidgets.git] / src / common / docview.cpp
index 81ec15a123d74a56b535686113f17c473b31d7a9..2ab0f4cd24503c7ea0344a52205b6d84f466d6c2 100644 (file)
@@ -1639,7 +1639,16 @@ bool wxCommandProcessor::CanUndo(void) const
 
 bool wxCommandProcessor::CanRedo(void) const
 {
-  return ((m_currentCommand && m_currentCommand->Next()));
+    if ((m_currentCommand != (wxNode*) NULL) && (m_currentCommand->Next() == (wxNode*) NULL))
+        return FALSE;
+
+    if ((m_currentCommand != (wxNode*) NULL) && (m_currentCommand->Next() != (wxNode*) NULL))
+        return TRUE;
+
+    if ((m_currentCommand == (wxNode*) NULL) && (m_commands.Number() > 0))
+        return TRUE;
+
+    return FALSE;
 }
 
 void wxCommandProcessor::Initialize(void)