X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68698f0308f5c46966b7de12b34f68ec23dd3ec8..3ccae3ba9bc59d76ca405f284dea44ba7f1d03b0:/src/mac/carbon/textctrl.cpp diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 852aa49750..17740e7cce 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1344,6 +1344,10 @@ void wxTextCtrl::Undo() { if (CanUndo()) { + if ( m_macUsesTXN ) + { + TXNUndo((TXNObject)m_macTXN); + } } } @@ -1351,16 +1355,36 @@ void wxTextCtrl::Redo() { if (CanRedo()) { + if ( m_macUsesTXN ) + { + TXNRedo((TXNObject)m_macTXN); + } } } bool wxTextCtrl::CanUndo() const { + if ( !IsEditable() ) + { + return false ; + } + if ( m_macUsesTXN ) + { + return TXNCanUndo((TXNObject)m_macTXN,NULL); + } return FALSE ; } bool wxTextCtrl::CanRedo() const { + if ( !IsEditable() ) + { + return false ; + } + if ( m_macUsesTXN ) + { + return TXNCanRedo((TXNObject)m_macTXN,NULL); + } return FALSE ; }