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:
Vadim Zeitlin
1999-10-24 00:30:53 +00:00
parent 8ee9d6182c
commit 2b2739754f
4 changed files with 18 additions and 5 deletions

View File

@@ -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--;
}