X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89c7e9622933c3ee7906c39bc3927a7d5616b94b..8704bf74fba8523e2e174bd5a8195b5202009cd0:/src/motif/listbox.cpp diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index 7425164595..8bf509bbbe 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -40,7 +40,6 @@ wxListBox::wxListBox(): m_clientDataList(wxKEY_INTEGER) { m_noItems = 0; m_selected = 0; - m_inSetValue = FALSE; } bool wxListBox::Create(wxWindow *parent, wxWindowID id, @@ -51,7 +50,6 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { - m_inSetValue = FALSE; m_windowStyle = style; m_noItems = n; m_selected = 0; @@ -86,6 +84,8 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, m_mainWidget = (WXWidget) listWidget; + Set(n, choices); + XtManageChild (listWidget); long width = size.x; @@ -434,6 +434,8 @@ void wxListBox::SetClientData(int N, char *Client_data) wxNode *node = m_clientDataList.Find ((long) N); if (node) node->SetData ((wxObject *)Client_data); + else + node = m_clientDataList.Append((long) N, (wxObject*) Client_data); } // Return number of selections and an array of selected integers @@ -681,7 +683,7 @@ void wxListBoxCallback (Widget w, XtPointer clientData, wxListBox *item = (wxListBox *) clientData; - if (item->m_inSetValue) + if (item->InSetValue()) return; wxCommandEvent event (wxEVT_COMMAND_LISTBOX_SELECTED);