Fix wxStyledTextCtrl::SetInsertionPointEnd().
This relied on SetInsertionPoint(-1) working like in wxTextCtrl but it didn't. Add an explicit check to it for consistency with the other classes and to make SetInsertionPointEnd() work. Closes #15234. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0a72cae73d
commit
1054bcb21f
@ -668,6 +668,7 @@ All (GUI):
|
||||
- Add more convenient wxFont(wxFontInfo) ctor.
|
||||
- Pass menu events to the handler in the associated wxMenuBar.
|
||||
- Add wxWindow::BeginRepositioningChildren() and EndRepositioningChildren().
|
||||
- Fix wxStyledTextCtrl::SetInsertionPointEnd() (troelsk).
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@ -4577,7 +4577,10 @@ public:
|
||||
|
||||
*/
|
||||
|
||||
virtual void SetInsertionPoint(long pos) { SetCurrentPos(pos); }
|
||||
virtual void SetInsertionPoint(long pos)
|
||||
{
|
||||
SetCurrentPos(pos == -1 ? GetLastPosition() : pos);
|
||||
}
|
||||
virtual long GetInsertionPoint() const { return GetCurrentPos(); }
|
||||
virtual long GetLastPosition() const { return GetTextLength(); }
|
||||
|
||||
|
@ -319,7 +319,10 @@ public:
|
||||
|
||||
*/
|
||||
|
||||
virtual void SetInsertionPoint(long pos) { SetCurrentPos(pos); }
|
||||
virtual void SetInsertionPoint(long pos)
|
||||
{
|
||||
SetCurrentPos(pos == -1 ? GetLastPosition() : pos);
|
||||
}
|
||||
virtual long GetInsertionPoint() const { return GetCurrentPos(); }
|
||||
virtual long GetLastPosition() const { return GetTextLength(); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user