generate wxEVT_COMMAND_LIST_END_LABEL_EDIT event even if label didn't change [backport of rev 47265 from trunk]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -131,6 +131,7 @@ wxGTK:
|
|||||||
- Don't unconditionally add wxCAPTION style to wxMiniFrame.
|
- Don't unconditionally add wxCAPTION style to wxMiniFrame.
|
||||||
- Fixed crash in file and dir pickers for GTK+ < 2.6 if compiled
|
- Fixed crash in file and dir pickers for GTK+ < 2.6 if compiled
|
||||||
with GTK+ >= 2.6.
|
with GTK+ >= 2.6.
|
||||||
|
- Generate wxEVT_COMMAND_LIST_END_LABEL_EDIT event even if label didn't change
|
||||||
|
|
||||||
wxMac:
|
wxMac:
|
||||||
|
|
||||||
|
@@ -2160,15 +2160,16 @@ bool wxListTextCtrlWrapper::AcceptChanges()
|
|||||||
{
|
{
|
||||||
const wxString value = m_text->GetValue();
|
const wxString value = m_text->GetValue();
|
||||||
|
|
||||||
if ( value == m_startValue )
|
// notice that we should always call OnRenameAccept() to generate the "end
|
||||||
// nothing changed, always accept
|
// label editing" event, even if the user hasn't really changed anything
|
||||||
return true;
|
|
||||||
|
|
||||||
if ( !m_owner->OnRenameAccept(m_itemEdited, value) )
|
if ( !m_owner->OnRenameAccept(m_itemEdited, value) )
|
||||||
|
{
|
||||||
// vetoed by the user
|
// vetoed by the user
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// accepted, do rename the item
|
// accepted, do rename the item (unless nothing changed)
|
||||||
|
if ( value != m_startValue )
|
||||||
m_owner->SetItemText(m_itemEdited, value);
|
m_owner->SetItemText(m_itemEdited, value);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user