KiCad PCB EDA Suite
load_select_footprint.cpp File Reference
#include <functional>
#include <fctsys.h>
#include <pcb_draw_panel_gal.h>
#include <confirm.h>
#include <eda_doc.h>
#include <kicad_string.h>
#include <pgm_base.h>
#include <kiway.h>
#include <view/view_controls.h>
#include <pcb_edit_frame.h>
#include <dialog_helpers.h>
#include <filter_reader.h>
#include <gr_basic.h>
#include <macros.h>
#include <fp_lib_table.h>
#include <lib_id.h>
#include <footprint_tree_pane.h>
#include <class_board.h>
#include <class_module.h>
#include <io_mgr.h>
#include <connectivity/connectivity_data.h>
#include <pcbnew.h>
#include <footprint_edit_frame.h>
#include <footprint_info.h>
#include <footprint_info_impl.h>
#include <dialog_choose_footprint.h>
#include <dialog_get_footprint_by_name.h>
#include <footprint_viewer_frame.h>
#include <wildcards_and_files_ext.h>
#include <widgets/progress_reporter.h>
#include <widgets/lib_tree.h>
#include "fp_tree_model_adapter.h"
#include "pcbnew_id.h"
#include <bitmaps.h>

Go to the source code of this file.

Functions

static void AddModuleToHistory (const wxString &aName)
 
static void clearModuleItemFlags (BOARD_ITEM *aItem)
 

Variables

static wxArrayString s_ModuleHistoryList
 
static unsigned s_ModuleHistoryMaxCount = 8
 
static MODULEs_ModuleInitialCopy = NULL
 
static PICKED_ITEMS_LIST s_PickedList
 

Function Documentation

◆ AddModuleToHistory()

static void AddModuleToHistory ( const wxString &  aName)
static

Definition at line 65 of file load_select_footprint.cpp.

66 {
67  // Remove duplicates
68  for( int ii = s_ModuleHistoryList.GetCount() - 1; ii >= 0; --ii )
69  {
70  if( s_ModuleHistoryList[ ii ] == aName )
71  s_ModuleHistoryList.RemoveAt( (size_t) ii );
72  }
73 
74  // Add the new name at the beginning of the history list
75  s_ModuleHistoryList.Insert( aName, 0 );
76 
77  // Remove extra names
78  while( s_ModuleHistoryList.GetCount() >= s_ModuleHistoryMaxCount )
79  s_ModuleHistoryList.RemoveAt( s_ModuleHistoryList.GetCount() - 1 );
80 }
static unsigned s_ModuleHistoryMaxCount
static wxArrayString s_ModuleHistoryList

References s_ModuleHistoryList, and s_ModuleHistoryMaxCount.

Referenced by PCB_BASE_FRAME::SelectFootprintFromLibTree().

◆ clearModuleItemFlags()

static void clearModuleItemFlags ( BOARD_ITEM aItem)
static

Definition at line 83 of file load_select_footprint.cpp.

84 {
85  aItem->ClearFlags();
86 }
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:266

References EDA_ITEM::ClearFlags().

Referenced by FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD().

Variable Documentation

◆ s_ModuleHistoryList

wxArrayString s_ModuleHistoryList
static

◆ s_ModuleHistoryMaxCount

unsigned s_ModuleHistoryMaxCount = 8
static

Definition at line 63 of file load_select_footprint.cpp.

Referenced by AddModuleToHistory().

◆ s_ModuleInitialCopy

MODULE* s_ModuleInitialCopy = NULL
static

Definition at line 435 of file load_select_footprint.cpp.

Referenced by PCB_BASE_FRAME::PlaceModule().

◆ s_PickedList

PICKED_ITEMS_LIST s_PickedList
static

Definition at line 437 of file load_select_footprint.cpp.

Referenced by PCB_BASE_FRAME::PlaceModule().