forked from mia/Aegisub
Fixed insertion of bold/italics/etc overrides on lines that contained non-ascii characters.
Originally committed to SVN as r1228.
This commit is contained in:
parent
34cd74525d
commit
35f2610bb8
2 changed files with 4 additions and 4 deletions
|
@ -915,8 +915,8 @@ void SubsEditBox::SetOverride (wxString tagname,wxString preValue,int forcePos,b
|
||||||
}
|
}
|
||||||
else TextEdit->GetSelection(&selstart,&selend);
|
else TextEdit->GetSelection(&selstart,&selend);
|
||||||
int len = TextEdit->GetText().Length();
|
int len = TextEdit->GetText().Length();
|
||||||
selstart = MID(0,selstart,len);
|
selstart = TextEdit->GetReverseUnicodePosition(MID(0,selstart,len));
|
||||||
selend = MID(0,selend,len);
|
selend = TextEdit->GetReverseUnicodePosition(MID(0,selend,len));
|
||||||
|
|
||||||
// Current tag name
|
// Current tag name
|
||||||
wxString alttagname = tagname;
|
wxString alttagname = tagname;
|
||||||
|
|
|
@ -69,8 +69,6 @@ private:
|
||||||
|
|
||||||
wxString GetWordAtPosition(int pos);
|
wxString GetWordAtPosition(int pos);
|
||||||
void GetBoundsOfWordAtPosition(int pos,int &start,int &end);
|
void GetBoundsOfWordAtPosition(int pos,int &start,int &end);
|
||||||
int GetUnicodePosition(int pos);
|
|
||||||
int GetReverseUnicodePosition(int pos);
|
|
||||||
void SetUnicodeStyling(int start,int length,int style);
|
void SetUnicodeStyling(int start,int length,int style);
|
||||||
void ShowPopupMenu(int activePos=-1);
|
void ShowPopupMenu(int activePos=-1);
|
||||||
|
|
||||||
|
@ -94,6 +92,8 @@ public:
|
||||||
SubsTextEditCtrl(wxWindow* parent, wxWindowID id, const wxString& value = _T(""), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr);
|
SubsTextEditCtrl(wxWindow* parent, wxWindowID id, const wxString& value = _T(""), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr);
|
||||||
~SubsTextEditCtrl();
|
~SubsTextEditCtrl();
|
||||||
|
|
||||||
|
int GetUnicodePosition(int pos);
|
||||||
|
int GetReverseUnicodePosition(int pos);
|
||||||
void SetSelectionU(int start,int end);
|
void SetSelectionU(int start,int end);
|
||||||
void SetTextTo(const wxString text);
|
void SetTextTo(const wxString text);
|
||||||
void UpdateStyle(int start=0,int length=-1);
|
void UpdateStyle(int start=0,int length=-1);
|
||||||
|
|
Loading…
Reference in a new issue