X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1d4dd7add411ebff1ce4a8d1d992e0e43ee26b1..a148cfb64451d6553cf66d1075b654e54e908210:/src/common/docview.cpp diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 40e21501fe..84acf51fa9 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1954,8 +1954,10 @@ void wxFileHistory::AddFileToHistory(const wxString& file) while (node) { wxMenu* menu = (wxMenu*) node->GetData(); - if (m_fileHistoryN == 0) + if ( m_fileHistoryN == 0 && menu->GetMenuItemCount() ) + { menu->AppendSeparator(); + } menu->Append(wxID_FILE1+m_fileHistoryN, _("[EMPTY]")); node = node->GetNext(); } @@ -2121,7 +2123,11 @@ void wxFileHistory::AddFilesToMenu() while (node) { wxMenu* menu = (wxMenu*) node->GetData(); - menu->AppendSeparator(); + if (menu->GetMenuItemCount()) + { + menu->AppendSeparator(); + } + int i; for (i = 0; i < m_fileHistoryN; i++) { @@ -2141,7 +2147,11 @@ void wxFileHistory::AddFilesToMenu(wxMenu* menu) { if (m_fileHistoryN > 0) { - menu->AppendSeparator(); + if (menu->GetMenuItemCount()) + { + menu->AppendSeparator(); + } + int i; for (i = 0; i < m_fileHistoryN; i++) {