Fix wxStyledTextCtrl::WriteText() to replace the selection.
WriteText() must replace the selection, not just insert the new text, otherwise SetValue() implementation inherited from the base class doesn't work as it doesn't clear the old contents of the control before adding new text to it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0015757fec
commit
933be2dc39
@ -4546,7 +4546,11 @@ public:
|
||||
// implement wxTextEntryBase pure virtual methods
|
||||
// ----------------------------------------------
|
||||
|
||||
virtual void WriteText(const wxString& text) { AddText(text); }
|
||||
virtual void WriteText(const wxString& text)
|
||||
{
|
||||
ReplaceSelection(text);
|
||||
}
|
||||
|
||||
virtual void Remove(long from, long to)
|
||||
{
|
||||
Replace(from, to, "");
|
||||
|
@ -288,7 +288,11 @@ public:
|
||||
// implement wxTextEntryBase pure virtual methods
|
||||
// ----------------------------------------------
|
||||
|
||||
virtual void WriteText(const wxString& text) { AddText(text); }
|
||||
virtual void WriteText(const wxString& text)
|
||||
{
|
||||
ReplaceSelection(text);
|
||||
}
|
||||
|
||||
virtual void Remove(long from, long to)
|
||||
{
|
||||
Replace(from, to, "");
|
||||
|
Loading…
Reference in New Issue
Block a user