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
(selectionOnly ? SFF_SELECTION : 0),
(LPARAM)&eds);
(selectionOnly ? SFF_SELECTION : 0),
(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?") );
void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly)
{
void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly)
{
- if ( value.empty() )
- return;
-
wxString valueDos;
if ( m_windowStyle & wxTE_MULTILINE )
valueDos = wxTextFile::Translate(value, wxTextFileType_Dos);
wxString valueDos;
if ( m_windowStyle & wxTE_MULTILINE )
valueDos = wxTextFile::Translate(value, wxTextFileType_Dos);