From d88eb514de3aafb01c1a668a2770ef8cdf5f5795 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 29 Aug 2000 16:18:39 +0000 Subject: [PATCH] Fixed CanCut git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/textctrl.cpp | 2 +- src/gtk1/textctrl.cpp | 2 +- src/motif/textctrl.cpp | 2 +- src/msw/textctrl.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 29437adb90..4cef1e8168 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -744,7 +744,7 @@ bool wxTextCtrl::CanCut() const // Can cut if there's a selection long from, to; GetSelection(& from, & to); - return (from != to) ; + return (from != to) && (IsEditable()); } bool wxTextCtrl::CanPaste() const diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index 29437adb90..4cef1e8168 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -744,7 +744,7 @@ bool wxTextCtrl::CanCut() const // Can cut if there's a selection long from, to; GetSelection(& from, & to); - return (from != to) ; + return (from != to) && (IsEditable()); } bool wxTextCtrl::CanPaste() const diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index 07bd42afba..af16bc359e 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -300,7 +300,7 @@ bool wxTextCtrl::CanCut() const // Can cut if there's a selection long from, to; GetSelection(& from, & to); - return (from != to) ; + return (from != to) && (IsEditable()); } bool wxTextCtrl::CanPaste() const diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 82f29026b7..c560d03a24 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -501,7 +501,7 @@ bool wxTextCtrl::CanCut() const // Can cut if there's a selection long from, to; GetSelection(& from, & to); - return (from != to); + return (from != to) && (IsEditable()); } bool wxTextCtrl::CanPaste() const