calling SetValue(GetValue()) didn't reset the modified flag (bug 678391)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-03-24 19:00:04 +00:00
parent c5c04fabb0
commit da32743f22
2 changed files with 17 additions and 7 deletions

View File

@@ -568,14 +568,16 @@ void wxTextCtrl::SetValue(const wxString& value)
if ( (value.length() > 0x400) || (value != GetValue()) )
{
DoWriteText(value, FALSE /* not selection only */);
// mark the control as being not dirty - we changed its text, not the
// user
DiscardEdits();
// for compatibility, don't move the cursor when doing SetValue()
SetInsertionPoint(0);
}
// we should reset the modified flag even if the value didn't really change
// mark the control as being not dirty - we changed its text, not the
// user
DiscardEdits();
// for compatibility, don't move the cursor when doing SetValue()
SetInsertionPoint(0);
}
#if wxUSE_RICHEDIT && (!wxUSE_UNICODE || wxUSE_UNICODE_MSLU)