After a conversaion with Vadim I reverted the last change and instead
just allowed for the specific situation that was incorrectly causing the assert. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -809,7 +809,10 @@ wxTextCtrl::StreamIn(const wxString& value,
|
|||||||
(selectionOnly ? SFF_SELECTION : 0),
|
(selectionOnly ? SFF_SELECTION : 0),
|
||||||
(LPARAM)&eds);
|
(LPARAM)&eds);
|
||||||
|
|
||||||
wxASSERT_MSG( ucf.GotUpdate(), _T("EM_STREAMIN didn't send EN_UPDATE?") );
|
// It's okay for EN_UPDATE to not be sent if the selection is empty and
|
||||||
|
// the text is empty, otherwise warn the programmer about it.
|
||||||
|
wxASSERT_MSG( ucf.GotUpdate() || ( !HasSelection() && value.empty() ),
|
||||||
|
_T("EM_STREAMIN didn't send EN_UPDATE?") );
|
||||||
|
|
||||||
if ( eds.dwError )
|
if ( eds.dwError )
|
||||||
{
|
{
|
||||||
@@ -895,9 +898,6 @@ void wxTextCtrl::WriteText(const wxString& value)
|
|||||||
|
|
||||||
void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly)
|
void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly)
|
||||||
{
|
{
|
||||||
if ( value.empty() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
wxString valueDos;
|
wxString valueDos;
|
||||||
if ( m_windowStyle & wxTE_MULTILINE )
|
if ( m_windowStyle & wxTE_MULTILINE )
|
||||||
valueDos = wxTextFile::Translate(value, wxTextFileType_Dos);
|
valueDos = wxTextFile::Translate(value, wxTextFileType_Dos);
|
||||||
|
Reference in New Issue
Block a user