Applied wxFileHistory menu separator patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e910c00040
commit
c8c5c7f62e
@ -1,4 +1,4 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
`/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/common/docview.cpp
|
||||
// Purpose: Document/view classes
|
||||
// Author: Julian Smart
|
||||
@ -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++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user