diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index b95498c5cb..c932ebf128 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -49,7 +49,6 @@ set( GERBVIEW_SRCS gerbview_frame.cpp json11.cpp job_file_reader.cpp - locate.cpp menubar.cpp readgerb.cpp rs274_read_XY_and_IJ_coordinates.cpp diff --git a/gerbview/excellon_read_drill_file.cpp b/gerbview/excellon_read_drill_file.cpp index c98cb17f56..c36eaa53d7 100644 --- a/gerbview/excellon_read_drill_file.cpp +++ b/gerbview/excellon_read_drill_file.cpp @@ -284,7 +284,7 @@ bool GERBVIEW_FRAME::Read_EXCELLON_File( const wxString& aFullFileName ) if( GetCanvas() ) { - for( GERBER_DRAW_ITEM* item = drill_layer->GetItemsList(); item; item = item->Next() ) + for( GERBER_DRAW_ITEM* item : drill_layer->GetItems() ) GetCanvas()->GetView()->Add( (KIGFX::VIEW_ITEM*) item ); } @@ -665,7 +665,7 @@ bool EXCELLON_IMAGE::Execute_Drill_Command( char*& text ) } gbritem = new GERBER_DRAW_ITEM( this ); - m_Drawings.Append( gbritem ); + AddItemToList( gbritem ); if( m_SlotOn ) // Oblong hole { @@ -925,7 +925,7 @@ void EXCELLON_IMAGE::FinishRouteCommand() false ); } - m_Drawings.Append( gbritem ); + AddItemToList( gbritem ); StepAndRepeatItem( *gbritem ); } diff --git a/gerbview/export_to_pcbnew.cpp b/gerbview/export_to_pcbnew.cpp index bcbcf14f60..3dfb432742 100644 --- a/gerbview/export_to_pcbnew.cpp +++ b/gerbview/export_to_pcbnew.cpp @@ -261,9 +261,7 @@ bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* aLayerLookUpTable, int aCopperLa if( pcb_layer_number <= pcbCopperLayerMax ) // copper layer continue; - GERBER_DRAW_ITEM* gerb_item = gerber->GetItemsList(); - - for( ; gerb_item; gerb_item = gerb_item->Next() ) + for( GERBER_DRAW_ITEM* gerb_item : gerber->GetItems() ) export_non_copper_item( gerb_item, pcb_layer_number ); } @@ -280,9 +278,7 @@ bool GBR_TO_PCB_EXPORTER::ExportPcb( LAYER_NUM* aLayerLookUpTable, int aCopperLa if( pcb_layer_number < 0 || pcb_layer_number > pcbCopperLayerMax ) continue; - GERBER_DRAW_ITEM* gerb_item = gerber->GetItemsList(); - - for( ; gerb_item; gerb_item = gerb_item->Next() ) + for( GERBER_DRAW_ITEM* gerb_item : gerber->GetItems() ) export_copper_item( gerb_item, pcb_layer_number ); } diff --git a/gerbview/gbr_layout.cpp b/gerbview/gbr_layout.cpp index b8d35cc3f6..d2ffff315f 100644 --- a/gerbview/gbr_layout.cpp +++ b/gerbview/gbr_layout.cpp @@ -31,7 +31,7 @@ #include GBR_LAYOUT::GBR_LAYOUT() : - EDA_ITEM( (EDA_ITEM*)NULL, GERBER_LAYOUT_T ) + EDA_ITEM( (EDA_ITEM*)nullptr, GERBER_LAYOUT_T ) { } @@ -59,7 +59,7 @@ EDA_RECT GBR_LAYOUT::ComputeBoundingBox() const if( gerber == NULL ) // Graphic layer not yet used continue; - for( GERBER_DRAW_ITEM* item = gerber->GetItemsList(); item; item = item->Next() ) + for( GERBER_DRAW_ITEM* item : gerber->GetItems() ) { if( first_item ) { @@ -95,7 +95,7 @@ SEARCH_RESULT GBR_LAYOUT::Visit( INSPECTOR inspector, void* testData, const KICA switch( stype ) { - case GERBER_IMAGE_LIST_T: + case GERBER_LAYOUT_T: for( unsigned layer = 0; layer < GetImagesList()->ImagesMaxCount(); ++layer ) { GERBER_FILE_IMAGE* gerber = GetImagesList()->GetGbrImage( layer ); diff --git a/gerbview/gbr_layout.h b/gerbview/gbr_layout.h index dfdb80e6a4..683e10b667 100644 --- a/gerbview/gbr_layout.h +++ b/gerbview/gbr_layout.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2012-2014 Jean-Pierre Charras jp.charras at wanadoo.fr - * Copyright (C) 1992-2019 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 1992-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,16 +32,11 @@ #define GBR_LAYOUT_H -#include - #include #include // PAGE_INFO #include // GERBER_DRAWLAYERS_COUNT #include #include -#include - -#include #include class GERBER_FILE_IMAGE_LIST; diff --git a/gerbview/gerber_collectors.cpp b/gerbview/gerber_collectors.cpp index f5a407cfcc..13c4504275 100644 --- a/gerbview/gerber_collectors.cpp +++ b/gerbview/gerber_collectors.cpp @@ -20,7 +20,7 @@ #include "gerber_collectors.h" const KICAD_T GERBER_COLLECTOR::AllItems[] = { - GERBER_IMAGE_LIST_T, + GERBER_LAYOUT_T, GERBER_IMAGE_T, GERBER_DRAW_ITEM_T, EOT diff --git a/gerbview/gerber_file_image.cpp b/gerbview/gerber_file_image.cpp index 7a2f703e77..464ccca011 100644 --- a/gerbview/gerber_file_image.cpp +++ b/gerbview/gerber_file_image.cpp @@ -6,8 +6,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2016 Jean-Pierre Charras jp.charras at wanadoo.fr - * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2019 Jean-Pierre Charras jp.charras at wanadoo.fr + * Copyright (C) 1992-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 @@ -105,7 +105,11 @@ GERBER_FILE_IMAGE::GERBER_FILE_IMAGE( int aLayer ) : GERBER_FILE_IMAGE::~GERBER_FILE_IMAGE() { - m_Drawings.DeleteAll(); + + for( auto item : GetItems() ) + delete item; + + m_drawings.clear(); for( unsigned ii = 0; ii < arrayDim( m_Aperture_List ); ii++ ) { @@ -115,15 +119,6 @@ GERBER_FILE_IMAGE::~GERBER_FILE_IMAGE() delete m_FileFunction; } -/* - * Function GetItemsList - * returns the first GERBER_DRAW_ITEM * item of the items list - */ -GERBER_DRAW_ITEM * GERBER_FILE_IMAGE::GetItemsList() -{ - return m_Drawings; -} - D_CODE* GERBER_FILE_IMAGE::GetDCODEOrCreate( int aDCODE, bool aCreateIfNoExist ) { @@ -245,7 +240,7 @@ bool GERBER_FILE_IMAGE::HasNegativeItems() else { m_hasNegativeItems = 0; - for( GERBER_DRAW_ITEM* item = GetItemsList(); item; item = item->Next() ) + for( GERBER_DRAW_ITEM* item : GetItems() ) { if( item->GetLayer() != m_GraphicLayer ) continue; @@ -313,6 +308,7 @@ void GERBER_FILE_IMAGE::StepAndRepeatItem( const GERBER_DRAW_ITEM& aItem ) // create duplicate only if ii or jj > 0 if( jj == 0 && ii == 0 ) continue; + GERBER_DRAW_ITEM* dupItem = new GERBER_DRAW_ITEM( aItem ); wxPoint move_vector; move_vector.x = scaletoIU( ii * GetLayerParams().m_StepForRepeat.x, @@ -320,7 +316,7 @@ void GERBER_FILE_IMAGE::StepAndRepeatItem( const GERBER_DRAW_ITEM& aItem ) move_vector.y = scaletoIU( jj * GetLayerParams().m_StepForRepeat.y, GetLayerParams().m_StepForRepeatMetric ); dupItem->MoveXY( move_vector ); - m_Drawings.Append( dupItem ); + AddItemToList( dupItem ); } } } @@ -397,10 +393,6 @@ SEARCH_RESULT GERBER_FILE_IMAGE::Visit( INSPECTOR inspector, void* testData, con const KICAD_T* p = scanTypes; bool done = false; -#if 0 && defined(DEBUG) - std::cout << GetClass().mb_str() << ' '; -#endif - while( !done ) { stype = *p; @@ -408,15 +400,16 @@ SEARCH_RESULT GERBER_FILE_IMAGE::Visit( INSPECTOR inspector, void* testData, con switch( stype ) { case GERBER_IMAGE_T: - case GERBER_IMAGE_LIST_T: + case GERBER_LAYOUT_T: ++p; break; case GERBER_DRAW_ITEM_T: - result = IterateForward( &m_Drawings[0], inspector, testData, p ); + result = IterateForward( GetItems(), inspector, testData, p ); ++p; break; + case EOT: default: // catch EOT or ANY OTHER type here and return. done = true; break; diff --git a/gerbview/gerber_file_image.h b/gerbview/gerber_file_image.h index 939b0e8c01..eaf1950905 100644 --- a/gerbview/gerber_file_image.h +++ b/gerbview/gerber_file_image.h @@ -1,8 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2010-2018 Jean-Pierre Charras jp.charras at wanadoo.fr - * Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2010-2019 Jean-Pierre Charras jp.charras at wanadoo.fr + * Copyright (C) 1992-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 @@ -37,6 +37,8 @@ #define IsNumber( x ) ( ( ( (x) >= '0' ) && ( (x) <='9' ) ) \ || ( (x) == '-' ) || ( (x) == '+' ) || ( (x) == '.' ) ) +typedef std::vector GERBER_DRAW_ITEMS; + class GERBVIEW_FRAME; class D_CODE; @@ -110,11 +112,10 @@ class GERBER_FILE_IMAGE : public EDA_ITEM ///< (max TOOLS_MAX_COUNT: see dcode.h) bool m_Exposure; ///< whether an aperture macro tool is flashed on or off - GERBER_LAYER m_GBRLayerParams; // hold params for the current gerber layer + GERBER_LAYER m_GBRLayerParams; // hold params for the current gerber layer + GERBER_DRAW_ITEMS m_drawings; // linked list of Gerber Items to draw public: - DLIST m_Drawings; // linked list of Gerber Items to draw - bool m_InUse; // true if this image is currently in use // (a file is loaded in it) bool m_IsVisible; // true if the draw layer is visible and must be drawn @@ -250,8 +251,6 @@ public: return wxT( "GERBER_FILE_IMAGE" ); } - void Clear_GERBER_FILE_IMAGE(); - /** * Read and load a gerber file. * @param aFullFileName = the full filename of the Gerber file @@ -264,7 +263,7 @@ public: const wxArrayString& GetMessages() const { return m_messagesList; } /** - * @return the count of Dcode tools in used by the image + * @return the count of Dcode tools in use in the image */ int GetDcodesCount(); @@ -273,10 +272,31 @@ public: COLOR4D GetPositiveDrawColor() const { return m_PositiveDrawColor; } /** - * Function GetItemsList - * @return the first GERBER_DRAW_ITEM * item of the items list + * @return a reference to the GERBER_DRAW_ITEMS deque list */ - GERBER_DRAW_ITEM * GetItemsList(); + GERBER_DRAW_ITEMS& GetItems() { return m_drawings; } + + /** + * @return the count of GERBER_DRAW_ITEMS in the image + */ + int GetItemsCount() { return m_drawings.size(); } + + /** + * Add a new GERBER_DRAW_ITEM item to the drawings list + * @param aItem is the GERBER_DRAW_ITEM to add to list + */ + void AddItemToList( GERBER_DRAW_ITEM* aItem ) + { + m_drawings.push_back( aItem ); + } + + /** + * @return the last GERBER_DRAW_ITEM* item of the items list + */ + GERBER_DRAW_ITEM* GetLastItemInList() const + { + return m_drawings.back(); + } /** * Function GetLayerParams diff --git a/gerbview/gerber_file_image_list.cpp b/gerbview/gerber_file_image_list.cpp index 6e81336477..2e71c667f3 100644 --- a/gerbview/gerber_file_image_list.cpp +++ b/gerbview/gerber_file_image_list.cpp @@ -43,13 +43,12 @@ GERBER_FILE_IMAGE_LIST s_GERBER_List; // GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files -GERBER_FILE_IMAGE_LIST::GERBER_FILE_IMAGE_LIST() : - EDA_ITEM( (EDA_ITEM*)NULL, GERBER_IMAGE_LIST_T ) +GERBER_FILE_IMAGE_LIST::GERBER_FILE_IMAGE_LIST() { m_GERBER_List.reserve( GERBER_DRAWLAYERS_COUNT ); for( unsigned layer = 0; layer < GERBER_DRAWLAYERS_COUNT; ++layer ) - m_GERBER_List.push_back( NULL ); + m_GERBER_List.push_back( nullptr ); } diff --git a/gerbview/gerber_file_image_list.h b/gerbview/gerber_file_image_list.h index 6880a91874..fca12d502e 100644 --- a/gerbview/gerber_file_image_list.h +++ b/gerbview/gerber_file_image_list.h @@ -60,7 +60,7 @@ class GERBER_FILE_IMAGE; * which are loaded and can be displayed * there are 32 images max which can be loaded */ -class GERBER_FILE_IMAGE_LIST : public EDA_ITEM +class GERBER_FILE_IMAGE_LIST { // the list of loaded images (1 image = 1 gerber file) std::vector m_GERBER_List; @@ -69,11 +69,6 @@ public: GERBER_FILE_IMAGE_LIST(); ~GERBER_FILE_IMAGE_LIST(); - wxString GetClass() const override - { - return wxT( "GERBER_FILE_IMAGE_LIST" ); - } - //Accessor static GERBER_FILE_IMAGE_LIST& GetImagesList(); GERBER_FILE_IMAGE* GetGbrImage( int aIdx ); @@ -123,12 +118,6 @@ public: * @return a mapping of old to new layer index */ std::unordered_map SortImagesByZOrder(); - - #if defined(DEBUG) - - void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); } - - #endif }; #endif // ifndef GERBER_FILE_IMAGE_LIST_H diff --git a/gerbview/gerbview_draw_panel_gal.cpp b/gerbview/gerbview_draw_panel_gal.cpp index 7e90ba3b00..ec1ac9670a 100644 --- a/gerbview/gerbview_draw_panel_gal.cpp +++ b/gerbview/gerbview_draw_panel_gal.cpp @@ -138,7 +138,7 @@ bool GERBVIEW_DRAW_PANEL_GAL::SwitchBackend( GAL_TYPE aGalType ) if( gerber == NULL ) // Graphic layer not yet used continue; - for( GERBER_DRAW_ITEM* item = gerber->GetItemsList(); item; item = item->Next() ) + for( GERBER_DRAW_ITEM* item : gerber->GetItems() ) { m_view->Add (item ); } diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index f26429218f..0ffa0db29e 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -470,8 +470,6 @@ public: */ void OnQuit( wxCommandEvent& event ); - GERBER_DRAW_ITEM* Locate( const wxPoint& aPosition, int typeloc ); - void OnUpdateDrawMode( wxUpdateUIEvent& aEvent ); void OnUpdateSelectDCode( wxUpdateUIEvent& aEvent ); void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent ); diff --git a/gerbview/locate.cpp b/gerbview/locate.cpp deleted file mode 100644 index 3f4d1dbb94..0000000000 --- a/gerbview/locate.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2016 KiCad Developers, see change_log.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 - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/** - * @file locate.cpp - */ - -#include -#include -#include - -#include -#include -#include -#include - - -/* locate a gerber item and return a pointer to it. - * Display info about this item - * Items on non visible layers are not taken in account - */ -GERBER_DRAW_ITEM* GERBVIEW_FRAME::Locate( const wxPoint& aPosition, int aTypeloc ) -{ - m_messagePanel->EraseMsgBox(); - wxPoint ref = aPosition; - - if( aTypeloc == CURSEUR_ON_GRILLE ) - ref = GetNearestGridPosition( ref ); - - int layer = GetActiveLayer(); - GERBER_FILE_IMAGE* gerber = GetGbrImage( layer ); - - GERBER_DRAW_ITEM* gerb_item = nullptr; - - // Search first on active layer - // A not used graphic layer can be selected. So gerber can be NULL - if( gerber && gerber->m_IsVisible ) - { - for( auto item = gerber->GetItemsList(); item; item = item->Next() ) - { - if( item->HitTest( ref ) ) - { - gerb_item = item; - break; - } - } - } - - if( gerb_item == nullptr ) // Search on all layers - { - for( layer = 0; layer < (int)ImagesMaxCount(); ++layer ) - { - gerber = GetGbrImage( layer ); - - if( gerber == nullptr ) // Graphic layer not yet used - continue; - - if( !gerber->m_IsVisible ) - continue; - - if( layer == GetActiveLayer() ) - continue; - - for( auto item = gerber->GetItemsList(); item; item = item->Next() ) - { - if( item->HitTest( ref ) ) - { - gerb_item = item; - break; - } - } - - if( gerb_item ) - break; - } - } - - if( gerb_item ) - { - MSG_PANEL_ITEMS items; - gerb_item->GetMsgPanelInfo( m_userUnits, items ); - SetMsgPanel( items ); - } - - return gerb_item; -} diff --git a/gerbview/readgerb.cpp b/gerbview/readgerb.cpp index c0a9fe9336..6e946ff256 100644 --- a/gerbview/readgerb.cpp +++ b/gerbview/readgerb.cpp @@ -79,7 +79,7 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName ) * or has missing definitions, * warn the user: */ - if( gerber->GetItemsList() && gerber->m_Has_MissingDCode ) + if( gerber->GetItemsCount() && gerber->m_Has_MissingDCode ) { if( !gerber->m_Has_DCode ) msg = _("Warning: this file has no D-Code definition\n" @@ -99,7 +99,11 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName ) // (maybe convert geometry into positives?) } - for( auto item = gerber->GetItemsList(); item; item = item->Next() ) +#ifdef GBR_USE_DLIST + for( auto item = gerber->GetFirstItemInList(); item; item = item->Next() ) +#else + for( auto item : gerber->GetItems() ) +#endif GetCanvas()->GetView()->Add( (KIGFX::VIEW_ITEM*) item ); } diff --git a/gerbview/rs274d.cpp b/gerbview/rs274d.cpp index 6acb231f9c..6e7b627346 100644 --- a/gerbview/rs274d.cpp +++ b/gerbview/rs274d.cpp @@ -552,9 +552,9 @@ bool GERBER_FILE_IMAGE::Execute_G_Command( char*& text, int G_command ) break; case GC_TURN_OFF_POLY_FILL: - if( m_Exposure && GetItemsList() ) // End of polygon + if( m_Exposure && GetLastItemInList() ) // End of polygon { - GERBER_DRAW_ITEM * gbritem = m_Drawings.GetLast(); + GERBER_DRAW_ITEM * gbritem = GetLastItemInList(); gbritem->m_Polygon.Append( gbritem->m_Polygon.CVertex( 0 ) ); StepAndRepeatItem( *gbritem ); } @@ -622,7 +622,7 @@ bool GERBER_FILE_IMAGE::Execute_DCODE_Command( char*& text, int D_commande ) { m_Exposure = true; gbritem = new GERBER_DRAW_ITEM( this ); - m_Drawings.Append( gbritem ); + AddItemToList( gbritem ); gbritem->m_Shape = GBR_POLYGON; gbritem->m_Flashed = false; gbritem->m_DCode = 0; // No DCode for a Polygon (Region in Gerber dialect) @@ -639,7 +639,7 @@ bool GERBER_FILE_IMAGE::Execute_DCODE_Command( char*& text, int D_commande ) { case GERB_INTERPOL_ARC_NEG: case GERB_INTERPOL_ARC_POS: - gbritem = m_Drawings.GetLast(); + gbritem = GetLastItemInList(); fillArcPOLY( gbritem, m_PreviousPos, m_CurrentPos, m_IJPos, @@ -648,7 +648,7 @@ bool GERBER_FILE_IMAGE::Execute_DCODE_Command( char*& text, int D_commande ) break; default: - gbritem = m_Drawings.GetLast(); + gbritem = GetLastItemInList(); gbritem->m_Start = m_PreviousPos; // m_Start is used as temporary storage if( gbritem->m_Polygon.OutlineCount() == 0 ) @@ -667,9 +667,9 @@ bool GERBER_FILE_IMAGE::Execute_DCODE_Command( char*& text, int D_commande ) break; case 2: // code D2: exposure OFF (i.e. "move to") - if( m_Exposure && GetItemsList() ) // End of polygon + if( m_Exposure && GetLastItemInList() ) // End of polygon { - gbritem = m_Drawings.GetLast(); + gbritem = GetLastItemInList(); gbritem->m_Polygon.Append( gbritem->m_Polygon.CVertex( 0 ) ); StepAndRepeatItem( *gbritem ); } @@ -702,7 +702,7 @@ bool GERBER_FILE_IMAGE::Execute_DCODE_Command( char*& text, int D_commande ) { case GERB_INTERPOL_LINEAR_1X: gbritem = new GERBER_DRAW_ITEM( this ); - m_Drawings.Append( gbritem ); + AddItemToList( gbritem ); fillLineGBRITEM( gbritem, dcode, m_PreviousPos, m_CurrentPos, size, GetLayerParams().m_LayerNegative ); @@ -712,7 +712,7 @@ bool GERBER_FILE_IMAGE::Execute_DCODE_Command( char*& text, int D_commande ) case GERB_INTERPOL_ARC_NEG: case GERB_INTERPOL_ARC_POS: gbritem = new GERBER_DRAW_ITEM( this ); - m_Drawings.Append( gbritem ); + AddItemToList( gbritem ); if( m_LastCoordIsIJPos ) { @@ -757,7 +757,7 @@ bool GERBER_FILE_IMAGE::Execute_DCODE_Command( char*& text, int D_commande ) } gbritem = new GERBER_DRAW_ITEM( this ); - m_Drawings.Append( gbritem ); + AddItemToList( gbritem ); fillFlashedGBRITEM( gbritem, aperture, dcode, m_CurrentPos, size, GetLayerParams().m_LayerNegative ); StepAndRepeatItem( *gbritem ); diff --git a/include/core/typeinfo.h b/include/core/typeinfo.h index 67d650e0df..2212ac3f3f 100644 --- a/include/core/typeinfo.h +++ b/include/core/typeinfo.h @@ -174,7 +174,6 @@ enum KICAD_T */ GERBER_LAYOUT_T, GERBER_DRAW_ITEM_T, - GERBER_IMAGE_LIST_T, GERBER_IMAGE_T, /*