Fix incorrect initialization of some menuitems IDs.

Although is is currently working, it is a potential issue.
This commit is contained in:
jean-pierre charras 2019-06-03 12:08:33 +02:00
parent 02947345e8
commit 1113e18c40
5 changed files with 14 additions and 14 deletions

View File

@ -25,6 +25,7 @@
#include <bin_mod.h>
#include <common.h>
#include <pgm_base.h>
#include <id.h>
BIN_MOD::BIN_MOD( const char* aName ) :

View File

@ -29,6 +29,7 @@
#include <dpi_scaling.h>
#include <kiface_i.h>
#include <pgm_base.h>
#include <id.h>
#include <wx/graphics.h>

View File

@ -79,7 +79,7 @@ enum gerbview_ids
ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS,
// IDs for drill file history (ID_FILEnn is already in use)
ID_GERBVIEW_DRILL_FILE = 4300,
ID_GERBVIEW_DRILL_FILE,
ID_GERBVIEW_DRILL_FILE1,
ID_GERBVIEW_DRILL_FILEMAX = ID_GERBVIEW_DRILL_FILE + MAX_FILE_HISTORY_SIZE,

View File

@ -61,6 +61,11 @@
#define ROOM_FOR_3D_VIEWER 100
#define ROOM_FOR_PANEL_PREV_MODEL 50
/// The default file history size is 9.
#define DEFAULT_FILE_HISTORY_SIZE 9
// Our max file history count
#define MAX_FILE_HISTORY_SIZE 99
enum main_id
{
ID_RUN_PCB = wxID_HIGHEST,
@ -85,6 +90,12 @@ enum main_id
ID_CONFIG_SAVE,
ID_CONFIG_READ,
// ID for menuitems used in our file history management,
// when we do not use wxFILE_ID (restricted to 9 items)
ID_FILE,
ID_FILE1,
ID_FILEMAX = ID_FILE + MAX_FILE_HISTORY_SIZE,
ID_MENU_CANVAS_LEGACY,
ID_MENU_CANVAS_OPENGL,
ID_MENU_CANVAS_CAIRO,

View File

@ -57,10 +57,6 @@
///@}
/// The default file history size is 9.
#define DEFAULT_FILE_HISTORY_SIZE 9
#define MAX_FILE_HISTORY_SIZE 99
class wxConfigBase;
class wxSingleInstanceChecker;
class wxApp;
@ -71,15 +67,6 @@ class FILENAME_RESOLVER;
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: