From fa31aeda87f2c82e6601f08440c6183bcac7c3f0 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 21 Dec 2005 20:51:14 +0000 Subject: [PATCH] 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 --- src/msw/textctrl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index aeba2610d9..3beeae7206 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -809,7 +809,10 @@ wxTextCtrl::StreamIn(const wxString& value, (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?") ); if ( eds.dwError ) { @@ -895,9 +898,6 @@ void wxTextCtrl::WriteText(const wxString& value) 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); -- 2.45.2