Fixed CanCut
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8c023dee92
commit
dbf2885911
@ -744,7 +744,7 @@ bool wxTextCtrl::CanCut() const
|
|||||||
// Can cut if there's a selection
|
// Can cut if there's a selection
|
||||||
long from, to;
|
long from, to;
|
||||||
GetSelection(& from, & to);
|
GetSelection(& from, & to);
|
||||||
return (from != to) ;
|
return (from != to) && (IsEditable());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTextCtrl::CanPaste() const
|
bool wxTextCtrl::CanPaste() const
|
||||||
|
@ -744,7 +744,7 @@ bool wxTextCtrl::CanCut() const
|
|||||||
// Can cut if there's a selection
|
// Can cut if there's a selection
|
||||||
long from, to;
|
long from, to;
|
||||||
GetSelection(& from, & to);
|
GetSelection(& from, & to);
|
||||||
return (from != to) ;
|
return (from != to) && (IsEditable());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTextCtrl::CanPaste() const
|
bool wxTextCtrl::CanPaste() const
|
||||||
|
@ -304,7 +304,7 @@ bool wxTextCtrl::CanCut() const
|
|||||||
// Can cut if there's a selection
|
// Can cut if there's a selection
|
||||||
long from, to;
|
long from, to;
|
||||||
GetSelection(& from, & to);
|
GetSelection(& from, & to);
|
||||||
return (from != to) ;
|
return (from != to) && (IsEditable());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTextCtrl::CanPaste() const
|
bool wxTextCtrl::CanPaste() const
|
||||||
|
@ -501,7 +501,7 @@ bool wxTextCtrl::CanCut() const
|
|||||||
// Can cut if there's a selection
|
// Can cut if there's a selection
|
||||||
long from, to;
|
long from, to;
|
||||||
GetSelection(& from, & to);
|
GetSelection(& from, & to);
|
||||||
return (from != to);
|
return (from != to) && (IsEditable());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTextCtrl::CanPaste() const
|
bool wxTextCtrl::CanPaste() const
|
||||||
|
Loading…
Reference in New Issue
Block a user