Browse Source

Ensure the demos folder exists before adding the menu item

6.0.7
Marek Roszko 4 years ago
parent
commit
ea73da8a27
  1. 9
      kicad/menubar.cpp

9
kicad/menubar.cpp

@ -27,6 +27,7 @@
#include <bitmaps.h>
#include <filehistory.h>
#include <menus_helpers.h>
#include <paths.h>
#include <tool/action_manager.h>
#include <tool/action_toolbar.h>
#include <tool/tool_manager.h>
@ -36,6 +37,7 @@
#include "pgm_kicad.h"
#include "kicad_id.h"
#include <widgets/wx_menubar.h>
#include <wx/dir.h>
void KICAD_MANAGER_FRAME::ReCreateMenuBar()
@ -69,7 +71,12 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
fileMenu->Add( KICAD_MANAGER_ACTIONS::newProject );
fileMenu->Add( KICAD_MANAGER_ACTIONS::newFromTemplate );
fileMenu->Add( KICAD_MANAGER_ACTIONS::openDemoProject );
if( wxDir::Exists( PATHS::GetStockDemosPath() ) )
{
fileMenu->Add( KICAD_MANAGER_ACTIONS::openDemoProject );
}
fileMenu->Add( KICAD_MANAGER_ACTIONS::openProject );
wxMenuItem* item = fileMenu->Add( openRecentMenu );

Loading…
Cancel
Save