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:
@@ -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
|
||||||
|
|
||||||
|
@@ -568,14 +568,16 @@ 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 */);
|
||||||
|
|
||||||
// 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)
|
#if wxUSE_RICHEDIT && (!wxUSE_UNICODE || wxUSE_UNICODE_MSLU)
|
||||||
|
Reference in New Issue
Block a user