For consistency with other ports, don't generate a selection event
when we change a listbox item's label git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,8 +43,6 @@
|
|||||||
extern bool g_blockEventsOnDrag;
|
extern bool g_blockEventsOnDrag;
|
||||||
extern bool g_blockEventsOnScroll;
|
extern bool g_blockEventsOnScroll;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Macro to tell which row the strings are in (1 if native checklist, 0 if not)
|
// Macro to tell which row the strings are in (1 if native checklist, 0 if not)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -720,6 +718,9 @@ void wxListBox::SetString(unsigned int n, const wxString &string)
|
|||||||
|
|
||||||
wxString label = string;
|
wxString label = string;
|
||||||
|
|
||||||
|
// Don't call the selection event handler if we only changed the item label
|
||||||
|
m_blockEvent = true;
|
||||||
|
|
||||||
// RN: This may look wierd but the problem is that the TreeView
|
// RN: This may look wierd but the problem is that the TreeView
|
||||||
// doesn't resort or update when changed above and there is no real
|
// doesn't resort or update when changed above and there is no real
|
||||||
// notification function...
|
// notification function...
|
||||||
@@ -735,6 +736,8 @@ void wxListBox::SetString(unsigned int n, const wxString &string)
|
|||||||
GtkInsertItems(aItems, &userdata, n);
|
GtkInsertItems(aItems, &userdata, n);
|
||||||
if (bWasSelected)
|
if (bWasSelected)
|
||||||
wxListBox::GtkSetSelection(n, true, true);
|
wxListBox::GtkSetSelection(n, true, true);
|
||||||
|
|
||||||
|
m_blockEvent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxListBox::GetString(unsigned int n) const
|
wxString wxListBox::GetString(unsigned int n) const
|
||||||
|
Reference in New Issue
Block a user