]> git.saurik.com Git - wxWidgets.git/commit
Copy wxCommandEvent string explicitly in its copy ctor.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 9 Oct 2012 21:01:53 +0000 (21:01 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 9 Oct 2012 21:01:53 +0000 (21:01 +0000)
commit34af6cfc8d07072bb8b44716ca62b45b95b1f6a9
tree94505cc018a625327102617fb5d7a5ceb1533496
parent8d489a5e4bbe809f18a5db15e65b58219cf48354
Copy wxCommandEvent string explicitly in its copy ctor.

Due to the optimization used in wxCommandEvent::GetString(), which returns the
string from the text control that generated the event only if it's really
needed, wxCommandEvent::m_cmdString field may be empty even when it does have
an associated string. As we lose the possibility to retrieve the value on
demand from wxTextCtrl when we make a copy (because it can be associated with
a different object), we need to explicitly copy the string to avoid losing
this data entirely.

This fixes GetString() value for the text events generated by generic
wxSearchCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/event.h