Fixed single-line text control breakage (sorry). Now only
skips the refresh when the new and old values are the same. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -275,11 +275,7 @@ void wxTextCtrl::SetValue(const wxString& value)
|
|||||||
{
|
{
|
||||||
m_modified = FALSE;
|
m_modified = FALSE;
|
||||||
|
|
||||||
if ((GetWindowStyle() & wxTE_MULTILINE) == 0)
|
wxString oldValue = GetValue();
|
||||||
{
|
|
||||||
if (value == GetValue())
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_cursorX = 0;
|
m_cursorX = 0;
|
||||||
m_cursorY = 0;
|
m_cursorY = 0;
|
||||||
@@ -331,6 +327,13 @@ void wxTextCtrl::SetValue(const wxString& value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't need to refresh if the value hasn't changed
|
||||||
|
if ((GetWindowStyle() & wxTE_MULTILINE) == 0)
|
||||||
|
{
|
||||||
|
if (value == oldValue)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MyAdjustScrollbars();
|
MyAdjustScrollbars();
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
|
Reference in New Issue
Block a user