git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47265
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Speed up wxBitmap::Rescale()
- Add right button event for wxToolbar's tools (Tim Kosse)
- Don't unconditionally add wxCAPTION style to wxMiniFrame
- Speed up wxBitmap::Rescale()
- Add right button event for wxToolbar's tools (Tim Kosse)
- Don't unconditionally add wxCAPTION style to wxMiniFrame
+- Generate wxEVT_COMMAND_LIST_END_LABEL_EDIT event even if label didn't change
{
const wxString value = m_text->GetValue();
{
const wxString value = m_text->GetValue();
- if ( value == m_startValue )
- // nothing changed, always accept
- return true;
-
+ // notice that we should always call OnRenameAccept() to generate the "end
+ // label editing" event, even if the user hasn't really changed anything
if ( !m_owner->OnRenameAccept(m_itemEdited, value) )
if ( !m_owner->OnRenameAccept(m_itemEdited, value) )
// vetoed by the user
return false;
// vetoed by the user
return false;
- // accepted, do rename the item
- m_owner->SetItemText(m_itemEdited, value);
+ // accepted, do rename the item (unless nothing changed)
+ if ( value != m_startValue )
+ m_owner->SetItemText(m_itemEdited, value);