Allow updating of file history size on the fly.

Also updates the file menu IDs so that we can actually handle
more than 9 items in the file history.

Also adds configurable file history length to the other gerber
files (zip, drill and job).

Fixes: lp:1745729
* https://bugs.launchpad.net/kicad/+bug/1745729
This commit is contained in:
Jeff Young 2018-08-20 14:46:38 +01:00
parent 8d625854b8
commit 86a801aabc
20 changed files with 104 additions and 69 deletions

View File

@ -45,10 +45,9 @@ void BIN_MOD::Init()
// get file history size from common settings // get file history size from common settings
int fileHistorySize; int fileHistorySize;
Pgm().CommonSettings()->Read( FILE_HISTORY_SIZE, &fileHistorySize, DEFAULT_FILE_HISTORY_SIZE ); Pgm().CommonSettings()->Read( FILE_HISTORY_SIZE_KEY, &fileHistorySize, DEFAULT_FILE_HISTORY_SIZE );
// file history size can only be set in wxFileHistory constructor m_history = new FILE_HISTORY( (unsigned) std::max( 0, fileHistorySize ), ID_FILE1 );
m_history = new wxFileHistory( fileHistorySize );
m_history->Load( *m_config ); m_history->Load( *m_config );
// Prepare On Line Help. Use only lower case for help file names, in order to // Prepare On Line Help. Use only lower case for help file names, in order to

View File

@ -52,7 +52,7 @@ bool PANEL_COMMON_SETTINGS::TransferDataToWindow()
m_SaveTime->SetValue( msg ); m_SaveTime->SetValue( msg );
int fileHistorySize; int fileHistorySize;
commonSettings->Read( FILE_HISTORY_SIZE, &fileHistorySize, DEFAULT_FILE_HISTORY_SIZE ); commonSettings->Read( FILE_HISTORY_SIZE_KEY, &fileHistorySize, DEFAULT_FILE_HISTORY_SIZE );
m_fileHistorySize->SetValue( fileHistorySize ); m_fileHistorySize->SetValue( fileHistorySize );
int scale_fourths; int scale_fourths;
@ -97,7 +97,7 @@ bool PANEL_COMMON_SETTINGS::TransferDataFromWindow()
commonSettings->Write( AUTOSAVE_INTERVAL_KEY, m_SaveTime->GetValue() * 60 ); commonSettings->Write( AUTOSAVE_INTERVAL_KEY, m_SaveTime->GetValue() * 60 );
commonSettings->Write( FILE_HISTORY_SIZE, m_fileHistorySize->GetValue() ); commonSettings->Write( FILE_HISTORY_SIZE_KEY, m_fileHistorySize->GetValue() );
const int scale_fourths = m_scaleAuto->GetValue() ? -1 : m_scaleSlider->GetValue() / 25; const int scale_fourths = m_scaleAuto->GetValue() ? -1 : m_scaleSlider->GetValue() / 25;
commonSettings->Write( ICON_SCALE_KEY, scale_fourths ); commonSettings->Write( ICON_SCALE_KEY, scale_fourths );

View File

@ -278,6 +278,14 @@ void EDA_DRAW_FRAME::CommonSettingsChanged()
{ {
EDA_BASE_FRAME::CommonSettingsChanged(); EDA_BASE_FRAME::CommonSettingsChanged();
int autosaveInterval;
Pgm().CommonSettings()->Read( AUTOSAVE_INTERVAL_KEY, &autosaveInterval );
SetAutoSaveInterval( autosaveInterval );
int historySize;
Pgm().CommonSettings()->Read( FILE_HISTORY_SIZE_KEY, &historySize, DEFAULT_FILE_HISTORY_SIZE );
Kiface().GetFileHistory().SetMaxFiles( (unsigned) std::max( 0, historySize ) );
bool option; bool option;
Pgm().CommonSettings()->Read( ENBL_MOUSEWHEEL_PAN_KEY, &option ); Pgm().CommonSettings()->Read( ENBL_MOUSEWHEEL_PAN_KEY, &option );
m_canvas->SetEnableMousewheelPan( option ); m_canvas->SetEnableMousewheelPan( option );

View File

@ -243,10 +243,6 @@ void EDA_BASE_FRAME::ShowChangedLanguage()
void EDA_BASE_FRAME::CommonSettingsChanged() void EDA_BASE_FRAME::CommonSettingsChanged()
{ {
int autosaveInterval;
Pgm().CommonSettings()->Read( AUTOSAVE_INTERVAL_KEY, &autosaveInterval );
SetAutoSaveInterval( autosaveInterval );
if( GetMenuBar() ) if( GetMenuBar() )
{ {
// For icons in menus, icon scaling & hotkeys // For icons in menus, icon scaling & hotkeys
@ -422,10 +418,7 @@ wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type,
return fn; return fn;
else else
{ {
wxString msg = wxString::Format( wxString msg = wxString::Format( _( "File \"%s\" was not found." ), fn );
_( "File \"%s\" was not found." ),
GetChars( fn ) );
wxMessageBox( msg ); wxMessageBox( msg );
fileHistory->RemoveFileFromHistory( i ); fileHistory->RemoveFileFromHistory( i );

View File

@ -66,6 +66,23 @@ static const wxChar showEnvVarWarningDialog[] = wxT( "ShowEnvVarWarningDialog" )
static const wxChar traceEnvVars[] = wxT( "KIENVVARS" ); static const wxChar traceEnvVars[] = wxT( "KIENVVARS" );
FILE_HISTORY::FILE_HISTORY( size_t aMaxFiles, int aBaseFileId ) :
wxFileHistory( std::min( aMaxFiles, (size_t) MAX_FILE_HISTORY_SIZE ) )
{
SetBaseId( aBaseFileId );
}
void FILE_HISTORY::SetMaxFiles( size_t aMaxFiles )
{
m_fileMaxFiles = std::min( aMaxFiles, (size_t) MAX_FILE_HISTORY_SIZE );
size_t numFiles = m_fileHistory.size();
while( numFiles > m_fileMaxFiles )
RemoveFileFromHistory( --numFiles );
}
/** /**
* A small class to handle the list of existing translations. * A small class to handle the list of existing translations.

View File

@ -224,7 +224,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_NEW_PROJECT, SCH_EDIT_FRAME::OnNewProject ) EVT_MENU( ID_NEW_PROJECT, SCH_EDIT_FRAME::OnNewProject )
EVT_MENU( ID_LOAD_PROJECT, SCH_EDIT_FRAME::OnLoadProject ) EVT_MENU( ID_LOAD_PROJECT, SCH_EDIT_FRAME::OnLoadProject )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, SCH_EDIT_FRAME::OnLoadFile ) EVT_MENU_RANGE( ID_FILE1, ID_FILEMAX, SCH_EDIT_FRAME::OnLoadFile )
EVT_MENU( ID_APPEND_PROJECT, SCH_EDIT_FRAME::OnAppendProject ) EVT_MENU( ID_APPEND_PROJECT, SCH_EDIT_FRAME::OnAppendProject )
EVT_MENU( ID_IMPORT_NON_KICAD_SCH, SCH_EDIT_FRAME::OnImportProject ) EVT_MENU( ID_IMPORT_NON_KICAD_SCH, SCH_EDIT_FRAME::OnImportProject )

View File

@ -67,15 +67,15 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_NEW_BOARD, GERBVIEW_FRAME::Files_io ) EVT_MENU( ID_NEW_BOARD, GERBVIEW_FRAME::Files_io )
EVT_MENU( ID_GERBVIEW_EXPORT_TO_PCBNEW, GERBVIEW_FRAME::ExportDataInPcbnewFormat ) EVT_MENU( ID_GERBVIEW_EXPORT_TO_PCBNEW, GERBVIEW_FRAME::ExportDataInPcbnewFormat )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, GERBVIEW_FRAME::OnGbrFileHistory ) EVT_MENU_RANGE( ID_FILE1, ID_FILEMAX, GERBVIEW_FRAME::OnGbrFileHistory )
EVT_MENU_RANGE( ID_GERBVIEW_DRILL_FILE1, ID_GERBVIEW_DRILL_FILE9, EVT_MENU_RANGE( ID_GERBVIEW_DRILL_FILE1, ID_GERBVIEW_DRILL_FILEMAX,
GERBVIEW_FRAME::OnDrlFileHistory ) GERBVIEW_FRAME::OnDrlFileHistory )
EVT_MENU_RANGE( ID_GERBVIEW_ZIP_FILE1, ID_GERBVIEW_ZIP_FILE9, EVT_MENU_RANGE( ID_GERBVIEW_ZIP_FILE1, ID_GERBVIEW_ZIP_FILEMAX,
GERBVIEW_FRAME::OnZipFileHistory ) GERBVIEW_FRAME::OnZipFileHistory )
EVT_MENU_RANGE( ID_GERBVIEW_JOB_FILE1, ID_GERBVIEW_JOB_FILE9, EVT_MENU_RANGE( ID_GERBVIEW_JOB_FILE1, ID_GERBVIEW_JOB_FILEMAX,
GERBVIEW_FRAME::OnJobFileHistory ) GERBVIEW_FRAME::OnJobFileHistory )
EVT_MENU( wxID_EXIT, GERBVIEW_FRAME::OnQuit ) EVT_MENU( wxID_EXIT, GERBVIEW_FRAME::OnQuit )

View File

@ -66,7 +66,10 @@ COLORS_DESIGN_SETTINGS g_ColorsSettings( FRAME_GERBER );
GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ): GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
EDA_DRAW_FRAME( aKiway, aParent, FRAME_GERBER, wxT( "GerbView" ), EDA_DRAW_FRAME( aKiway, aParent, FRAME_GERBER, wxT( "GerbView" ),
wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GERBVIEW_FRAME_NAME ) wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GERBVIEW_FRAME_NAME ),
m_zipFileHistory( DEFAULT_FILE_HISTORY_SIZE, ID_GERBVIEW_ZIP_FILE1 ),
m_drillFileHistory( DEFAULT_FILE_HISTORY_SIZE, ID_GERBVIEW_DRILL_FILE1 ),
m_jobFileHistory( DEFAULT_FILE_HISTORY_SIZE, ID_GERBVIEW_JOB_FILE1 )
{ {
m_colorsSettings = &g_ColorsSettings; m_colorsSettings = &g_ColorsSettings;
m_gerberLayout = NULL; m_gerberLayout = NULL;
@ -90,9 +93,12 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
m_SelNetnameBox = nullptr; m_SelNetnameBox = nullptr;
m_SelAperAttributesBox = nullptr; m_SelAperAttributesBox = nullptr;
m_displayMode = 0; m_displayMode = 0;
m_drillFileHistory.SetBaseId( ID_GERBVIEW_DRILL_FILE1 );
m_zipFileHistory.SetBaseId( ID_GERBVIEW_ZIP_FILE1 ); int fileHistorySize;
m_jobFileHistory.SetBaseId( ID_GERBVIEW_JOB_FILE1 ); Pgm().CommonSettings()->Read( FILE_HISTORY_SIZE_KEY, &fileHistorySize, DEFAULT_FILE_HISTORY_SIZE );
m_drillFileHistory.SetMaxFiles( fileHistorySize );
m_zipFileHistory.SetMaxFiles( fileHistorySize );
m_jobFileHistory.SetMaxFiles( fileHistorySize );
EDA_DRAW_PANEL_GAL* galCanvas = new GERBVIEW_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), EDA_DRAW_PANEL_GAL* galCanvas = new GERBVIEW_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ),
m_FrameSize, m_FrameSize,

View File

@ -27,6 +27,7 @@
#define WX_GERBER_STRUCT_H #define WX_GERBER_STRUCT_H
#include <pgm_base.h>
#include <config_params.h> #include <config_params.h>
#include <draw_frame.h> #include <draw_frame.h>
#include <layers_id_colors_and_visibility.h> #include <layers_id_colors_and_visibility.h>
@ -157,13 +158,13 @@ protected:
GERBER_LAYER_WIDGET* m_LayersManager; GERBER_LAYER_WIDGET* m_LayersManager;
// Auxiliary file history used to store zip files history. // Auxiliary file history used to store zip files history.
wxFileHistory m_zipFileHistory; FILE_HISTORY m_zipFileHistory;
// Auxiliary file history used to store drill files history. // Auxiliary file history used to store drill files history.
wxFileHistory m_drillFileHistory; FILE_HISTORY m_drillFileHistory;
// Auxiliary file history used to store job files history. // Auxiliary file history used to store job files history.
wxFileHistory m_jobFileHistory; FILE_HISTORY m_jobFileHistory;
/// The last filename chosen to be proposed to the user /// The last filename chosen to be proposed to the user
wxString m_lastFileName; wxString m_lastFileName;

View File

@ -26,6 +26,7 @@
#define __GERBVIEW_ID_H__ #define __GERBVIEW_ID_H__
#include <id.h> #include <id.h>
#include <pgm_base.h>
/** /**
* Command IDs for the printed circuit board editor. * Command IDs for the printed circuit board editor.
@ -54,42 +55,6 @@ enum gerbview_ids
ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE, ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE,
ID_GBR_AUX_TOOLBAR_PCB_APERATTRIBUTES_CHOICE, ID_GBR_AUX_TOOLBAR_PCB_APERATTRIBUTES_CHOICE,
// IDs for drill file history (wxID_FILEnn is already in use)
ID_GERBVIEW_DRILL_FILE,
ID_GERBVIEW_DRILL_FILE1,
ID_GERBVIEW_DRILL_FILE2,
ID_GERBVIEW_DRILL_FILE3,
ID_GERBVIEW_DRILL_FILE4,
ID_GERBVIEW_DRILL_FILE5,
ID_GERBVIEW_DRILL_FILE6,
ID_GERBVIEW_DRILL_FILE7,
ID_GERBVIEW_DRILL_FILE8,
ID_GERBVIEW_DRILL_FILE9,
// IDs for job file history (wxID_FILEnn is already in use)
ID_GERBVIEW_JOB_FILE,
ID_GERBVIEW_JOB_FILE1,
ID_GERBVIEW_JOB_FILE2,
ID_GERBVIEW_JOB_FILE3,
ID_GERBVIEW_JOB_FILE4,
ID_GERBVIEW_JOB_FILE5,
ID_GERBVIEW_JOB_FILE6,
ID_GERBVIEW_JOB_FILE7,
ID_GERBVIEW_JOB_FILE8,
ID_GERBVIEW_JOB_FILE9,
// IDs for zip file history (wxID_FILEnn is already in use)
ID_GERBVIEW_ZIP_FILE,
ID_GERBVIEW_ZIP_FILE1,
ID_GERBVIEW_ZIP_FILE2,
ID_GERBVIEW_ZIP_FILE3,
ID_GERBVIEW_ZIP_FILE4,
ID_GERBVIEW_ZIP_FILE5,
ID_GERBVIEW_ZIP_FILE6,
ID_GERBVIEW_ZIP_FILE7,
ID_GERBVIEW_ZIP_FILE8,
ID_GERBVIEW_ZIP_FILE9,
ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
ID_GERBVIEW_ERASE_CURR_LAYER, ID_GERBVIEW_ERASE_CURR_LAYER,
ID_GERBVIEW_OPTIONS_SETUP, ID_GERBVIEW_OPTIONS_SETUP,
@ -112,6 +77,21 @@ enum gerbview_ids
ID_HIGHLIGHT_NET_ITEMS, ID_HIGHLIGHT_NET_ITEMS,
ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS, ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS,
// IDs for drill file history (ID_FILEnn is already in use)
ID_GERBVIEW_DRILL_FILE = 4300,
ID_GERBVIEW_DRILL_FILE1,
ID_GERBVIEW_DRILL_FILEMAX = ID_GERBVIEW_DRILL_FILE + MAX_FILE_HISTORY_SIZE,
// IDs for job file history (ID_FILEnn is already in use)
ID_GERBVIEW_JOB_FILE,
ID_GERBVIEW_JOB_FILE1,
ID_GERBVIEW_JOB_FILEMAX = ID_GERBVIEW_JOB_FILE + MAX_FILE_HISTORY_SIZE,
// IDs for zip file history (ID_FILEnn is already in use)
ID_GERBVIEW_ZIP_FILE,
ID_GERBVIEW_ZIP_FILE1,
ID_GERBVIEW_ZIP_FILEMAX = ID_GERBVIEW_ZIP_FILE + MAX_FILE_HISTORY_SIZE,
ID_GERBER_END_LIST ID_GERBER_END_LIST
}; };

View File

@ -35,6 +35,7 @@
#include <search_stack.h> #include <search_stack.h>
class wxConfigBase; class wxConfigBase;
class FILE_HISTORY;
/** /**
* Struct BIN_MOD * Struct BIN_MOD
@ -55,7 +56,7 @@ struct BIN_MOD
const char* m_name; ///< name of this binary module, static C string. const char* m_name; ///< name of this binary module, static C string.
wxConfigBase* m_config; ///< maybe from $HOME/.${m_name} wxConfigBase* m_config; ///< maybe from $HOME/.${m_name}
wxFileHistory* m_history; FILE_HISTORY* m_history;
wxString m_help_file; wxString m_help_file;
SEARCH_STACK m_search; SEARCH_STACK m_search;

View File

@ -120,7 +120,7 @@ public:
*/ */
const wxString& GetHelpFileName() const { return m_bm.m_help_file; } const wxString& GetHelpFileName() const { return m_bm.m_help_file; }
wxFileHistory& GetFileHistory() { return *m_bm.m_history; } FILE_HISTORY& GetFileHistory() { return *m_bm.m_history; }
/// Only for DSO specific 'non-library' files. /// Only for DSO specific 'non-library' files.
/// (The library search path is in the PROJECT class.) /// (The library search path is in the PROJECT class.)

View File

@ -33,6 +33,7 @@
#include <map> #include <map>
#include <wx/filename.h> #include <wx/filename.h>
#include <wx/filehistory.h>
#include <search_stack.h> #include <search_stack.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
@ -47,12 +48,13 @@
#define ENBL_MOUSEWHEEL_PAN_KEY wxT( "MousewheelPAN" ) #define ENBL_MOUSEWHEEL_PAN_KEY wxT( "MousewheelPAN" )
#define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" ) #define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" )
#define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" ) #define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" )
#define FILE_HISTORY_SIZE wxT( "FileHistorySize" ) #define FILE_HISTORY_SIZE_KEY wxT( "FileHistorySize" )
///@} ///@}
/// The default file history size is 9. /// The default file history size is 9.
#define DEFAULT_FILE_HISTORY_SIZE 9 #define DEFAULT_FILE_HISTORY_SIZE 9
#define MAX_FILE_HISTORY_SIZE 99
class wxConfigBase; class wxConfigBase;
class wxSingleInstanceChecker; class wxSingleInstanceChecker;
@ -64,6 +66,24 @@ class FILENAME_RESOLVER;
class EDA_DRAW_FRAME; class EDA_DRAW_FRAME;
enum FILE_HISTORY_IDS
{
ID_FILE = 4200,
ID_FILE1,
ID_FILEMAX = ID_FILE + MAX_FILE_HISTORY_SIZE
};
class FILE_HISTORY : public wxFileHistory
{
public:
FILE_HISTORY( size_t aMaxFiles, int aBaseFileId );
void SetMaxFiles( size_t aMaxFiles );
};
// inter program module calling // inter program module calling
#define VTBL_ENTRY virtual #define VTBL_ENTRY virtual

View File

@ -229,6 +229,8 @@ public:
void SaveSettings( wxConfigBase* aCfg ) override; void SaveSettings( wxConfigBase* aCfg ) override;
void CommonSettingsChanged() override;
/** /**
* Open another KiCad application and logs a message. * Open another KiCad application and logs a message.
* *

View File

@ -507,6 +507,14 @@ void KICAD_MANAGER_FRAME::language_change( wxCommandEvent& event )
} }
void KICAD_MANAGER_FRAME::CommonSettingsChanged()
{
int historySize;
Pgm().CommonSettings()->Read( FILE_HISTORY_SIZE_KEY, &historySize, DEFAULT_FILE_HISTORY_SIZE );
PgmTop().GetFileHistory().SetMaxFiles( (unsigned) std::max( 0, historySize ) );
}
void KICAD_MANAGER_FRAME::ClearMsg() void KICAD_MANAGER_FRAME::ClearMsg()
{ {
m_MessagesBox->Clear(); m_MessagesBox->Clear();

View File

@ -70,7 +70,7 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
KICAD_MANAGER_FRAME::language_change ) KICAD_MANAGER_FRAME::language_change )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, KICAD_MANAGER_FRAME::OnFileHistory ) EVT_MENU_RANGE( ID_FILE1, ID_FILEMAX, KICAD_MANAGER_FRAME::OnFileHistory )
// Show hotkeys // Show hotkeys
EVT_MENU( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, KICAD_MANAGER_FRAME::OnShowHotkeys ) EVT_MENU( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, KICAD_MANAGER_FRAME::OnShowHotkeys )

View File

@ -54,7 +54,7 @@ public:
void MacOpenFile( const wxString& aFileName ) override; void MacOpenFile( const wxString& aFileName ) override;
wxFileHistory& GetFileHistory() { return *m_bm.m_history; } FILE_HISTORY& GetFileHistory() { return *m_bm.m_history; }
wxConfigBase* PgmSettings() { return m_bm.m_config; } wxConfigBase* PgmSettings() { return m_bm.m_config; }

View File

@ -66,7 +66,7 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_GEN_PLOT, PL_EDITOR_FRAME::ToPlotter ) EVT_MENU( ID_GEN_PLOT, PL_EDITOR_FRAME::ToPlotter )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, PL_EDITOR_FRAME::OnFileHistory ) EVT_MENU_RANGE( ID_FILE1, ID_FILEMAX, PL_EDITOR_FRAME::OnFileHistory )
EVT_MENU( wxID_EXIT, PL_EDITOR_FRAME::OnQuit ) EVT_MENU( wxID_EXIT, PL_EDITOR_FRAME::OnQuit )

View File

@ -717,7 +717,7 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
// Some commands are available only if Pcbnew is run outside a project (run alone). // Some commands are available only if Pcbnew is run outside a project (run alone).
// aIsOutsideProject is false when Pcbnew is run from Kicad manager. // aIsOutsideProject is false when Pcbnew is run from Kicad manager.
wxFileHistory& fhist = Kiface().GetFileHistory(); FILE_HISTORY& fhist = Kiface().GetFileHistory();
// Load Recent submenu // Load Recent submenu
static wxMenu* openRecentMenu; static wxMenu* openRecentMenu;

View File

@ -118,7 +118,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_MENU( ID_SAVE_BOARD_AS, PCB_EDIT_FRAME::Files_io ) EVT_MENU( ID_SAVE_BOARD_AS, PCB_EDIT_FRAME::Files_io )
EVT_MENU( ID_COPY_BOARD_AS, PCB_EDIT_FRAME::Files_io ) EVT_MENU( ID_COPY_BOARD_AS, PCB_EDIT_FRAME::Files_io )
EVT_MENU( ID_IMPORT_NON_KICAD_BOARD, PCB_EDIT_FRAME::Files_io ) EVT_MENU( ID_IMPORT_NON_KICAD_BOARD, PCB_EDIT_FRAME::Files_io )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, PCB_EDIT_FRAME::OnFileHistory ) EVT_MENU_RANGE( ID_FILE1, ID_FILEMAX, PCB_EDIT_FRAME::OnFileHistory )
EVT_MENU( ID_GEN_PLOT, PCB_EDIT_FRAME::ToPlotter ) EVT_MENU( ID_GEN_PLOT, PCB_EDIT_FRAME::ToPlotter )