diff --git a/common/tool/common_tools.cpp b/common/tool/common_tools.cpp index b66585a140..9d8876a732 100644 --- a/common/tool/common_tools.cpp +++ b/common/tool/common_tools.cpp @@ -33,6 +33,7 @@ #include #include #include +#include void COMMON_TOOLS::Reset( RESET_REASON aReason ) diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 16947fe35b..8d416b49dd 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -53,6 +53,7 @@ #include #include #include "sch_junction.h" +#include "eeschema_id.h" #define FR_HISTORY_LIST_CNT 10 ///< Maximum number of find and replace strings. diff --git a/eeschema/tools/ee_point_editor.cpp b/eeschema/tools/ee_point_editor.cpp index 6426cd8608..ad0f05ba35 100644 --- a/eeschema/tools/ee_point_editor.cpp +++ b/eeschema/tools/ee_point_editor.cpp @@ -43,7 +43,7 @@ using namespace std::placeholders; #include #include #include -#include +#include // Point editor diff --git a/gerbview/onleftclick.cpp b/gerbview/onleftclick.cpp index 0191f61f7b..e2a7a26026 100644 --- a/gerbview/onleftclick.cpp +++ b/gerbview/onleftclick.cpp @@ -30,6 +30,7 @@ #include #include #include +#include /* Process the command triggered by the left button of the mouse * currently: just display info in the message panel. diff --git a/include/base_screen.h b/include/base_screen.h index 8fb710e1fa..8730f4c2ad 100644 --- a/include/base_screen.h +++ b/include/base_screen.h @@ -36,7 +36,6 @@ #include #include #include -#include /** * Class GRID_TYPE diff --git a/kicad/commandframe.cpp b/kicad/commandframe.cpp index d9b6ec8a10..209185096c 100644 --- a/kicad/commandframe.cpp +++ b/kicad/commandframe.cpp @@ -32,6 +32,7 @@ #include #include "kicad.h" +#include "kicad_id.h" // Amount of clearance between tool buttons const int BUTTON_SEPARATION = 5; diff --git a/kicad/kicad.h b/kicad/kicad.h index 5fe2876f55..d78e21add5 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013 CERN (www.cern.ch) - * Copyright (C) 2017 KiCad Developers, see CHANGELOG.txt for contributors. + * Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -32,8 +32,6 @@ #include - -#include #include #include @@ -75,62 +73,6 @@ enum TreeFileType { }; -/** - * Command IDs for KiCad. - * - * Please add IDs that are unique to Kicad here and not in the global id.h file. - * This will prevent the entire project from being rebuilt when adding - * new commands to KiCad. - * - * However, now the Kicad manager and other sub applications are running inside - * the same application, these IDs are kept unique inside the whole Kicad code - * See the global id.h which reserves room for the Kicad manager IDs - * and expand this room if needed - * - * We have experienced issues with duplicate menus IDs between frames - * because wxUpdateUIEvent events are sent to parent frames, when a wxUpdateUIEvent - * event function does not exists for some menuitems ID, and therefore - * with duplicate menuitems IDs in different frames, the wrong menuitem can be used - * by a function called by the wxUpdateUIEvent event loop. - * - * The number of items in this list should be less than ROOM_FOR_KICADMANAGER (see id.h) - */ - -enum id_kicad_frm { - ID_LEFT_FRAME = ID_KICAD_MANAGER_START, - ID_PROJECT_TREE, - ID_PROJECT_TXTEDIT, - ID_PROJECT_TREE_REFRESH, - ID_PROJECT_SWITCH_TO_OTHER, - ID_PROJECT_NEWDIR, - ID_PROJECT_DELETE, - ID_PROJECT_RENAME, - ID_PROJECT_OPEN_FILE_WITH_TEXT_EDITOR, - - ID_TO_SCH, - ID_TO_SCH_LIB_EDITOR, - ID_TO_PCB, - ID_TO_PCB_FP_EDITOR, - ID_TO_CVPCB, - ID_TO_GERBVIEW, - ID_TO_BITMAP_CONVERTER, - ID_TO_PCB_CALCULATOR, - ID_TO_PL_EDITOR, - - ID_TO_TEXT_EDITOR, - ID_BROWSE_AN_SELECT_FILE, - ID_BROWSE_IN_FILE_EXPLORER, - ID_SAVE_AND_ZIP_FILES, - ID_READ_ZIP_ARCHIVE, - ID_INIT_WATCHED_PATHS, - ID_IMPORT_EAGLE_PROJECT, - - // Please, verify: the number of items in this list should be - // less than ROOM_FOR_KICADMANAGER (see id.h) - ID_KICADMANAGER_END_LIST -}; - - /** * The main KiCad project manager frame. It is not a KIWAY_PLAYER. */ diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 5554cd791d..a2123174dd 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -42,6 +42,7 @@ #include #include "pgm_kicad.h" #include "tree_project_frame.h" +#include "kicad_id.h" #ifdef __WXMAC__ #include diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index 23ec3d8995..a4b91802f4 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -35,6 +35,7 @@ #include "kicad.h" #include "pgm_kicad.h" +#include "kicad_id.h" // Menubar and toolbar event table diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp index d12275d144..144a3ca9a9 100644 --- a/kicad/prjconfig.cpp +++ b/kicad/prjconfig.cpp @@ -45,6 +45,7 @@ #include "kicad.h" #include "pgm_kicad.h" #include "tree_project_frame.h" +#include "kicad_id.h" #define SEP() wxFileName::GetPathSeparator() diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 2bb7a03df1..0c5ab8f544 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -44,6 +44,7 @@ #include "treeproject_item.h" #include "treeprojectfiles.h" #include "pgm_kicad.h" +#include "kicad_id.h" #include "tree_project_frame.h" diff --git a/kicad/treeproject_item.cpp b/kicad/treeproject_item.cpp index c04ef8beb3..d96338f3f1 100644 --- a/kicad/treeproject_item.cpp +++ b/kicad/treeproject_item.cpp @@ -37,8 +37,8 @@ #include "treeprojectfiles.h" #include "pgm_kicad.h" #include "tree_project_frame.h" - #include "treeproject_item.h" +#include "kicad_id.h" TREEPROJECT_ITEM::TREEPROJECT_ITEM( enum TreeFileType type, const wxString& data, diff --git a/kicad/treeprojectfiles.cpp b/kicad/treeprojectfiles.cpp index fc2d1ef47c..4ec9881fe7 100644 --- a/kicad/treeprojectfiles.cpp +++ b/kicad/treeprojectfiles.cpp @@ -32,8 +32,8 @@ #include "treeproject_item.h" #include "tree_project_frame.h" - #include "treeprojectfiles.h" +#include "kicad_id.h" IMPLEMENT_ABSTRACT_CLASS( TREEPROJECTFILES, wxTreeCtrl ) diff --git a/pagelayout_editor/tools/pl_editor_control.cpp b/pagelayout_editor/tools/pl_editor_control.cpp index 5a3e10828b..a41cef7280 100644 --- a/pagelayout_editor/tools/pl_editor_control.cpp +++ b/pagelayout_editor/tools/pl_editor_control.cpp @@ -33,6 +33,7 @@ #include #include #include +#include TOOL_ACTION PL_ACTIONS::refreshPreview( "plEditor.EditorControl.refreshPreview", AS_GLOBAL, 0, "", "" ); diff --git a/pagelayout_editor/tools/pl_point_editor.cpp b/pagelayout_editor/tools/pl_point_editor.cpp index 6818b92da2..9ac7966124 100644 --- a/pagelayout_editor/tools/pl_point_editor.cpp +++ b/pagelayout_editor/tools/pl_point_editor.cpp @@ -39,6 +39,7 @@ using namespace std::placeholders; #include #include #include +#include // Few constants to avoid using bare numbers for point indices diff --git a/pcbnew/dialogs/dialog_set_grid.cpp b/pcbnew/dialogs/dialog_set_grid.cpp index 6aa73c4eeb..a64783d28c 100644 --- a/pcbnew/dialogs/dialog_set_grid.cpp +++ b/pcbnew/dialogs/dialog_set_grid.cpp @@ -40,6 +40,8 @@ #include #include +#include + // Max values for grid size static const int MAX_GRID_SIZE = KiROUND( 1000.0 * IU_PER_MM ); static const int MIN_GRID_SIZE = KiROUND( 0.001 * IU_PER_MM ); diff --git a/pcbnew/footprint_preview_panel.cpp b/pcbnew/footprint_preview_panel.cpp index ad3416ff55..7eee6c95ca 100644 --- a/pcbnew/footprint_preview_panel.cpp +++ b/pcbnew/footprint_preview_panel.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -39,6 +38,7 @@ #include #include #include +#include /** * Threadsafe interface class between loader thread and panel class. diff --git a/pcbnew/tools/pad_tool.cpp b/pcbnew/tools/pad_tool.cpp index 2bfd0058a1..39723b7877 100644 --- a/pcbnew/tools/pad_tool.cpp +++ b/pcbnew/tools/pad_tool.cpp @@ -40,6 +40,7 @@ #include "selection_tool.h" #include "pcb_selection_conditions.h" #include "edit_tool.h" +#include "pcbnew_id.h" // Pad tools TOOL_ACTION PCB_ACTIONS::copyPadSettings(