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

@@ -466,3 +466,11 @@ Checking in include/wx/msw/spinctrl.h;
/pack/cvsroots/wxwindows/wxWindows/include/wx/msw/spinctrl.h,v <-- spinctrl.h /pack/cvsroots/wxwindows/wxWindows/include/wx/msw/spinctrl.h,v <-- spinctrl.h
new revision: 1.16; previous revision: 1.15 new revision: 1.16; previous revision: 1.15
40. calling SetValue(GetValue()) didn't reset the modified flag
http://sf.net/tracker/index.php?func=detail&aid=678391&group_id=9863&atid=109863
Checking in src/msw/textctrl.cpp;
/pack/cvsroots/wxwindows/wxWindows/src/msw/textctrl.cpp,v <-- textctrl.cpp
new revision: 1.164; previous revision: 1.163

View File

@@ -568,6 +568,9 @@ void wxTextCtrl::SetValue(const wxString& value)
if ( (value.length() > 0x400) || (value != GetValue()) ) if ( (value.length() > 0x400) || (value != GetValue()) )
{ {
DoWriteText(value, FALSE /* not selection only */); DoWriteText(value, FALSE /* not selection only */);
}
// 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 // mark the control as being not dirty - we changed its text, not the
// user // user
@@ -575,7 +578,6 @@ void wxTextCtrl::SetValue(const wxString& value)
// for compatibility, don't move the cursor when doing SetValue() // for compatibility, don't move the cursor when doing SetValue()
SetInsertionPoint(0); SetInsertionPoint(0);
}
} }
#if wxUSE_RICHEDIT && (!wxUSE_UNICODE || wxUSE_UNICODE_MSLU) #if wxUSE_RICHEDIT && (!wxUSE_UNICODE || wxUSE_UNICODE_MSLU)