wxRichTextCtrl no longer deletes a character when content is selected
before pressing Delete (fixes bug #10153). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@56990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -103,6 +103,8 @@ All (GUI):
|
|||||||
Also fixed a bug whereby e.g. Croatian keys didn't work, by moving more code
|
Also fixed a bug whereby e.g. Croatian keys didn't work, by moving more code
|
||||||
to key down handler.
|
to key down handler.
|
||||||
- Fixed a problem with HTML list generation for wxRichTextCtrl.
|
- Fixed a problem with HTML list generation for wxRichTextCtrl.
|
||||||
|
- wxRichTextCtrl no longer deletes a character when content is selected
|
||||||
|
before pressing Delete.
|
||||||
- Fixed wxHTML's pagebreaks computation in tables (D.J.Stauffer).
|
- Fixed wxHTML's pagebreaks computation in tables (D.J.Stauffer).
|
||||||
- Fixed wxHtmlWindow::SelectionToText() to correctly insert newlines after
|
- Fixed wxHtmlWindow::SelectionToText() to correctly insert newlines after
|
||||||
single-cell paragraphs.
|
single-cell paragraphs.
|
||||||
|
@@ -760,13 +760,12 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
|
|
||||||
long newPos = m_caretPosition;
|
long newPos = m_caretPosition;
|
||||||
|
|
||||||
DeleteSelectedContent(& newPos);
|
bool processed = DeleteSelectedContent(& newPos);
|
||||||
|
|
||||||
// Submit range in character positions, which are greater than caret positions,
|
// Submit range in character positions, which are greater than caret positions,
|
||||||
// so subtract 1 for deleted character and add 1 for conversion to character position.
|
// so subtract 1 for deleted character and add 1 for conversion to character position.
|
||||||
if (newPos > -1)
|
if (newPos > -1)
|
||||||
{
|
{
|
||||||
bool processed = false;
|
|
||||||
if (event.CmdDown())
|
if (event.CmdDown())
|
||||||
{
|
{
|
||||||
long pos = wxRichTextCtrl::FindNextWordPosition(-1);
|
long pos = wxRichTextCtrl::FindNextWordPosition(-1);
|
||||||
@@ -865,13 +864,12 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
|
|
||||||
long newPos = m_caretPosition;
|
long newPos = m_caretPosition;
|
||||||
|
|
||||||
DeleteSelectedContent(& newPos);
|
bool processed = DeleteSelectedContent(& newPos);
|
||||||
|
|
||||||
// Submit range in character positions, which are greater than caret positions,
|
// Submit range in character positions, which are greater than caret positions,
|
||||||
// so subtract 1 for deleted character and add 1 for conversion to character position.
|
// so subtract 1 for deleted character and add 1 for conversion to character position.
|
||||||
if (newPos > -1)
|
if (newPos > -1)
|
||||||
{
|
{
|
||||||
bool processed = false;
|
|
||||||
if (event.CmdDown())
|
if (event.CmdDown())
|
||||||
{
|
{
|
||||||
long pos = wxRichTextCtrl::FindNextWordPosition(-1);
|
long pos = wxRichTextCtrl::FindNextWordPosition(-1);
|
||||||
|
Reference in New Issue
Block a user