1. compilation fix for wxArrayTreeItemIds
2. small bug fixes for recent fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -122,7 +122,7 @@ protected:
|
||||
long m_itemId;
|
||||
};
|
||||
|
||||
WX_DEFINE_EXPORTED_ARRAY(wxTreeItemId, wxArrayTreeItemIds);
|
||||
WX_DEFINE_EXPORTED_ARRAY(WXHTREEITEM, wxArrayTreeItemIds);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTreeItemData is some (arbitrary) user class associated with some item. The
|
||||
|
@@ -1909,9 +1909,6 @@ void wxFileHistory::RemoveFileFromHistory(int i)
|
||||
{
|
||||
wxMenu* menu = (wxMenu*) node->Data();
|
||||
|
||||
// delete the menu items
|
||||
menu->Delete(wxID_FILE1 + i);
|
||||
|
||||
// delete the element from the array (could use memmove() too...)
|
||||
delete [] m_fileHistory[i];
|
||||
|
||||
@@ -1930,7 +1927,17 @@ void wxFileHistory::RemoveFileFromHistory(int i)
|
||||
}
|
||||
|
||||
node = node->Next();
|
||||
|
||||
// delete the last menu item which is unused now
|
||||
menu->Delete(wxID_FILE1 + m_fileHistoryN - 1);
|
||||
|
||||
// unfortunately, we can't delete separator (there is no function to
|
||||
// delete item by position, only by id - and what if there are several
|
||||
// separators in this menu?) - so we will be always left with at least
|
||||
// one and, even worse, we will add another one if this was the last
|
||||
// file... (FIXME)
|
||||
}
|
||||
|
||||
m_fileHistoryN--;
|
||||
}
|
||||
|
||||
|
@@ -317,10 +317,15 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int n = GetSelection();
|
||||
wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId);
|
||||
event.SetInt(GetSelection());
|
||||
event.SetInt(n);
|
||||
event.SetEventObject(this);
|
||||
event.SetString(GetStringSelection());
|
||||
if ( HasClientObjectData() )
|
||||
event.SetClientObject( GetClientObject(n) );
|
||||
else if ( HasClientUntypedData() )
|
||||
event.SetClientData( GetClientData(n) );
|
||||
ProcessCommand(event);
|
||||
|
||||
return TRUE;
|
||||
|
@@ -357,6 +357,7 @@ void wxListBox::Clear()
|
||||
}
|
||||
|
||||
void wxListBox::Free()
|
||||
{
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
size_t uiCount = m_aItems.Count();
|
||||
while ( uiCount-- != 0 ) {
|
||||
|
Reference in New Issue
Block a user