Commit 64f12ffe authored by dickelbeck's avatar dickelbeck

gerberview & pcbnew fixes

parent 5e448ec4
...@@ -4,6 +4,21 @@ Started 2007-June-11 ...@@ -4,6 +4,21 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2007-Sep-25 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+ pcbnew
* got rid of reference to global display options DisplayOpt.DisplayZones from
collectors.cpp so collectors.cpp can continue to be used in multiple future
(non-display related) general contexts.
* Moved TYPEZONE to end of AllBoardItems, added GENERAL_COLLECTOR::AllButZones to
provide support of DisplayOpt.DisplayZones.
* Added aHotKeyCode to PcbGeneralLocateAndDisplay()
+ gerbview
* viewer was getting stuck in a loop when loading a bad gerber file. Fixed
the bug, but line 223 through 225 of readgerb.cpp need review.
* beautified a few files with uncrustify, (any I had to look at).
2007-sept-25 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-sept-25 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+ pcbnew: + pcbnew:
......
/******************************************************/ /******************************************************/
/* Files.cp: Lecture / Sauvegarde des fichiers gerber */ /* Files.cp: Lecture / Sauvegarde des fichiers gerber */
/******************************************************/ /******************************************************/
#include "fctsys.h" #include "fctsys.h"
...@@ -12,27 +12,29 @@ ...@@ -12,27 +12,29 @@
/* Routines locales */ /* Routines locales */
static void LoadDCodeFile(WinEDA_GerberFrame * frame, const wxString & FullFileName, wxDC * DC); static void LoadDCodeFile( WinEDA_GerberFrame* frame, const wxString& FullFileName, wxDC* DC );
/********************************************************/ /********************************************************/
void WinEDA_GerberFrame::Files_io(wxCommandEvent& event) void WinEDA_GerberFrame::Files_io( wxCommandEvent& event )
/********************************************************/ /********************************************************/
/* Gestion generale des commandes de lecture de fichiers /* Gestion generale des commandes de lecture de fichiers
*/ */
{ {
int id = event.GetId(); int id = event.GetId();
wxClientDC dc(DrawPanel);
wxClientDC dc( DrawPanel );
DrawPanel->CursorOff(&dc); DrawPanel->CursorOff( &dc );
switch (id) switch( id )
{ {
case ID_MENU_LOAD_FILE: case ID_MENU_LOAD_FILE:
case ID_LOAD_FILE: case ID_LOAD_FILE:
if ( Clear_Pcb(&dc, TRUE) ) if( Clear_Pcb( &dc, TRUE ) )
{ {
LoadOneGerberFile(wxEmptyString, &dc, 0); LoadOneGerberFile( wxEmptyString, &dc, 0 );
} }
break; break;
...@@ -41,7 +43,7 @@ wxClientDC dc(DrawPanel); ...@@ -41,7 +43,7 @@ wxClientDC dc(DrawPanel);
{ {
int layer = GetScreen()->m_Active_Layer; int layer = GetScreen()->m_Active_Layer;
GetScreen()->m_Active_Layer++; GetScreen()->m_Active_Layer++;
if( ! LoadOneGerberFile(wxEmptyString, &dc, 0) ) if( !LoadOneGerberFile( wxEmptyString, &dc, 0 ) )
GetScreen()->m_Active_Layer = layer; GetScreen()->m_Active_Layer = layer;
SetToolbars(); SetToolbars();
} }
...@@ -49,13 +51,13 @@ wxClientDC dc(DrawPanel); ...@@ -49,13 +51,13 @@ wxClientDC dc(DrawPanel);
case ID_MENU_APPEND_FILE: case ID_MENU_APPEND_FILE:
case ID_APPEND_FILE: case ID_APPEND_FILE:
LoadOneGerberFile(wxEmptyString, &dc, 0); LoadOneGerberFile( wxEmptyString, &dc, 0 );
break; break;
case ID_MENU_NEW_BOARD: case ID_MENU_NEW_BOARD:
case ID_NEW_BOARD: case ID_NEW_BOARD:
Clear_Pcb(&dc, TRUE); Clear_Pcb( &dc, TRUE );
Zoom_Automatique(FALSE); Zoom_Automatique( FALSE );
GetScreen()->SetRefreshReq(); GetScreen()->SetRefreshReq();
break; break;
...@@ -69,63 +71,64 @@ wxClientDC dc(DrawPanel); ...@@ -69,63 +71,64 @@ wxClientDC dc(DrawPanel);
case ID_LOAD_FILE_8: case ID_LOAD_FILE_8:
case ID_LOAD_FILE_9: case ID_LOAD_FILE_9:
case ID_LOAD_FILE_10: case ID_LOAD_FILE_10:
if ( Clear_Pcb(&dc, TRUE) ) if( Clear_Pcb( &dc, TRUE ) )
{ {
LoadOneGerberFile( LoadOneGerberFile(
GetLastProject(id - ID_LOAD_FILE_1).GetData(), GetLastProject( id - ID_LOAD_FILE_1 ).GetData(),
&dc, FALSE); &dc, FALSE );
} }
break; break;
case ID_GERBVIEW_LOAD_DRILL_FILE: case ID_GERBVIEW_LOAD_DRILL_FILE:
DisplayError(this, _("Not yet available...")); DisplayError( this, _( "Not yet available..." ) );
break; break;
case ID_GERBVIEW_LOAD_DCODE_FILE: case ID_GERBVIEW_LOAD_DCODE_FILE:
LoadDCodeFile(this, wxEmptyString, &dc); LoadDCodeFile( this, wxEmptyString, &dc );
break; break;
case ID_SAVE_BOARD: case ID_SAVE_BOARD:
case ID_MENU_SAVE_BOARD: case ID_MENU_SAVE_BOARD:
SaveGerberFile(GetScreen()->m_FileName, &dc); SaveGerberFile( GetScreen()->m_FileName, &dc );
break; break;
case ID_MENU_SAVE_BOARD_AS: case ID_MENU_SAVE_BOARD_AS:
SaveGerberFile(wxEmptyString, &dc); SaveGerberFile( wxEmptyString, &dc );
break; break;
default: default:
DisplayError(this, wxT("File_io Internal Error") ); DisplayError( this, wxT( "File_io Internal Error" ) );
break; break;
} }
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
DrawPanel->CursorOn(&dc); DrawPanel->CursorOn( &dc );
} }
/*******************************************************************************************/ /*******************************************************************************************/
int WinEDA_GerberFrame::LoadOneGerberFile(const wxString & FullFileName, int WinEDA_GerberFrame::LoadOneGerberFile( const wxString& FullFileName,
wxDC * DC, int mode) wxDC* DC, int mode )
/*******************************************************************************************/ /*******************************************************************************************/
/* /*
Lecture d'un fichier PCB, le nom etant dans PcbNameBuffer.s * Lecture d'un fichier PCB, le nom etant dans PcbNameBuffer.s
retourne: * retourne:
0 si fichier non lu ( annulation de commande ... ) * 0 si fichier non lu ( annulation de commande ... )
1 si OK * 1 si OK
*/ */
{ {
wxString filename = FullFileName; wxString filename = FullFileName;
wxString path = wxPathOnly(FullFileName); wxString path = wxPathOnly( FullFileName );
ActiveScreen = GetScreen(); ActiveScreen = GetScreen();
if( filename == wxEmptyString) if( filename == wxEmptyString )
{ {
wxString mask = wxT("*") + g_PhotoFilenameExt; wxString mask = wxT( "*" ) + g_PhotoFilenameExt;
mask += wxT(";*.gbr;*.gbx;*.lgr;*.ger");
filename = EDA_FileSelector(_("Gerber files:"), mask += wxT( ";*.gbr;*.gbx;*.lgr;*.ger" );
filename = EDA_FileSelector( _( "Gerber files:" ),
path, /* Chemin par defaut */ path, /* Chemin par defaut */
wxEmptyString, /* nom fichier par defaut */ wxEmptyString, /* nom fichier par defaut */
g_PhotoFilenameExt, /* extension par defaut */ g_PhotoFilenameExt, /* extension par defaut */
...@@ -134,45 +137,50 @@ wxString path = wxPathOnly(FullFileName); ...@@ -134,45 +137,50 @@ wxString path = wxPathOnly(FullFileName);
0, 0,
FALSE FALSE
); );
if ( filename == wxEmptyString ) return FALSE; if( filename == wxEmptyString )
return FALSE;
} }
GetScreen()->m_FileName = filename; GetScreen()->m_FileName = filename;
wxSetWorkingDirectory(path);
ChangeFileNameExt(filename,g_PenFilenameExt);
if ( Read_GERBER_File(DC, GetScreen()->m_FileName, filename) ) wxSetWorkingDirectory( path );
SetLastProject(GetScreen()->m_FileName);
ChangeFileNameExt( filename, g_PenFilenameExt );
Zoom_Automatique(FALSE); if( Read_GERBER_File( DC, GetScreen()->m_FileName, filename ) )
SetLastProject( GetScreen()->m_FileName );
Zoom_Automatique( FALSE );
GetScreen()->SetRefreshReq(); GetScreen()->SetRefreshReq();
g_SaveTime = time(NULL); g_SaveTime = time( NULL );
return(1); return 1;
} }
/**********************************************************************************************/ /**********************************************************************************************/
static void LoadDCodeFile(WinEDA_GerberFrame * frame, const wxString & FullFileName, wxDC * DC) static void LoadDCodeFile( WinEDA_GerberFrame* frame, const wxString& FullFileName, wxDC* DC )
/**********************************************************************************************/ /**********************************************************************************************/
/* /*
Lecture d'un fichier PCB, le nom etant dans PcbNameBuffer.s * Lecture d'un fichier PCB, le nom etant dans PcbNameBuffer.s
retourne: * retourne:
0 si fichier non lu ( annulation de commande ... ) * 0 si fichier non lu ( annulation de commande ... )
1 si OK * 1 si OK
*/ */
{ {
wxString filename = FullFileName; wxString filename = FullFileName;
ActiveScreen = frame->GetScreen(); ActiveScreen = frame->GetScreen();
if( filename == wxEmptyString) if( filename == wxEmptyString )
{ {
wxString penfilesmask( wxT("*") ); wxString penfilesmask( wxT( "*" ) );
penfilesmask += g_PenFilenameExt; penfilesmask += g_PenFilenameExt;
filename = frame->GetScreen()->m_FileName; filename = frame->GetScreen()->m_FileName;
ChangeFileNameExt(filename,g_PenFilenameExt); ChangeFileNameExt( filename, g_PenFilenameExt );
filename = EDA_FileSelector(_("D codes files:"), filename = EDA_FileSelector( _( "D codes files:" ),
wxEmptyString, /* Chemin par defaut */ wxEmptyString, /* Chemin par defaut */
filename, /* nom fichier par defaut */ filename, /* nom fichier par defaut */
g_PenFilenameExt, /* extension par defaut */ g_PenFilenameExt, /* extension par defaut */
...@@ -181,29 +189,31 @@ wxString filename = FullFileName; ...@@ -181,29 +189,31 @@ wxString filename = FullFileName;
0, 0,
TRUE TRUE
); );
if ( filename == wxEmptyString ) return; if( filename == wxEmptyString )
return;
} }
frame->Read_D_Code_File(filename); frame->Read_D_Code_File( filename );
frame->CopyDCodesSizeToItems(); frame->CopyDCodesSizeToItems();
frame->GetScreen()->SetRefreshReq(); frame->GetScreen()->SetRefreshReq();
} }
/*******************************************************************************/ /*******************************************************************************/
bool WinEDA_GerberFrame::SaveGerberFile(const wxString & FullFileName, wxDC * DC) bool WinEDA_GerberFrame::SaveGerberFile( const wxString& FullFileName, wxDC* DC )
/*******************************************************************************/ /*******************************************************************************/
/* Sauvegarde du fichier PCB en format ASCII /* Sauvegarde du fichier PCB en format ASCII
*/ */
{ {
wxString filename = FullFileName; wxString filename = FullFileName;
if( filename == wxEmptyString ) if( filename == wxEmptyString )
{ {
wxString mask( wxT("*")); wxString mask( wxT( "*" ) );
mask += g_PhotoFilenameExt; mask += g_PhotoFilenameExt;
filename = EDA_FileSelector(_("Gerber files:"), filename = EDA_FileSelector( _( "Gerber files:" ),
wxEmptyString, /* Chemin par defaut */ wxEmptyString, /* Chemin par defaut */
GetScreen()->m_FileName, /* nom fichier par defaut */ GetScreen()->m_FileName, /* nom fichier par defaut */
g_PhotoFilenameExt, /* extension par defaut */ g_PhotoFilenameExt, /* extension par defaut */
...@@ -212,7 +222,8 @@ wxString filename = FullFileName; ...@@ -212,7 +222,8 @@ wxString filename = FullFileName;
wxFD_SAVE, wxFD_SAVE,
FALSE FALSE
); );
if ( filename.IsEmpty() ) return FALSE; if( filename.IsEmpty() )
return FALSE;
} }
GetScreen()->m_FileName = filename; GetScreen()->m_FileName = filename;
...@@ -221,6 +232,3 @@ wxString filename = FullFileName; ...@@ -221,6 +232,3 @@ wxString filename = FullFileName;
return TRUE; return TRUE;
} }
This diff is collapsed.
This diff is collapsed.
...@@ -112,11 +112,11 @@ public: ...@@ -112,11 +112,11 @@ public:
/** /**
* Function Remove * Function Remove
* removes the item at item_position (first position is 0); * removes the item at item_position (first position is 0);
* @param item_position index. * @param ndx The index into the list.
*/ */
void Remove( unsigned int item_position ) void Remove( int ndx )
{ {
m_List.erase( m_List.begin() + item_position ); m_List.erase( m_List.begin() + (unsigned) ndx );
} }
/** /**
......
...@@ -400,8 +400,12 @@ public: ...@@ -400,8 +400,12 @@ public:
* a popup menu is shown which allows the user to pick which item he/she is * a popup menu is shown which allows the user to pick which item he/she is
* interested in. Once an item is chosen, then it is make the "current item" * interested in. Once an item is chosen, then it is make the "current item"
* and the status window is updated to reflect this. * and the status window is updated to reflect this.
*
* @param aHotKeyCode The hotkey which relates to the caller and determines the
* type of search to be performed. If zero, then the mouse tools will be
* tested instead.
*/ */
BOARD_ITEM* PcbGeneralLocateAndDisplay(); BOARD_ITEM* PcbGeneralLocateAndDisplay( int aHotKeyCode = 0 );
BOARD_ITEM* Locate( int typeloc, int LayerSearch ); BOARD_ITEM* Locate( int typeloc, int LayerSearch );
void ProcessItemSelection( wxCommandEvent& event ); void ProcessItemSelection( wxCommandEvent& event );
......
...@@ -38,10 +38,10 @@ const KICAD_T GENERAL_COLLECTOR::AllBoardItems[] = { ...@@ -38,10 +38,10 @@ const KICAD_T GENERAL_COLLECTOR::AllBoardItems[] = {
TYPECOTATION, TYPECOTATION,
TYPEVIA, TYPEVIA,
TYPETRACK, TYPETRACK,
TYPEZONE,
TYPEPAD, TYPEPAD,
TYPETEXTEMODULE, TYPETEXTEMODULE,
TYPEMODULE, TYPEMODULE,
TYPEZONE,
EOT EOT
}; };
...@@ -52,8 +52,19 @@ const KICAD_T GENERAL_COLLECTOR::PrimaryItems[] = { ...@@ -52,8 +52,19 @@ const KICAD_T GENERAL_COLLECTOR::PrimaryItems[] = {
TYPECOTATION, TYPECOTATION,
TYPEVIA, TYPEVIA,
TYPETRACK, TYPETRACK,
// TYPEPAD, TYPEPAD and TYPETEXTEMODULE are handled in a subsearch TYPEMODULE,
// TYPETEXTEMODULE, EOT
};
const KICAD_T GENERAL_COLLECTOR::AllButZones[] = {
TYPETEXTE,
TYPEDRAWSEGMENT,
TYPECOTATION,
TYPEVIA,
TYPETRACK,
TYPEPAD,
TYPETEXTEMODULE,
TYPEMODULE, TYPEMODULE,
EOT EOT
}; };
...@@ -95,7 +106,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void* ...@@ -95,7 +106,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
{ {
BOARD_ITEM* item = (BOARD_ITEM*) testItem; BOARD_ITEM* item = (BOARD_ITEM*) testItem;
MODULE* module = NULL; MODULE* module = NULL;
bool skip_item = false;
#if 0 // debugging #if 0 // debugging
static int breakhere = 0; static int breakhere = 0;
...@@ -173,7 +183,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void* ...@@ -173,7 +183,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
case TYPETRACK: case TYPETRACK:
break; break;
case TYPEZONE: case TYPEZONE:
if( ! DisplayOpt.DisplayZones ) skip_item = true;
break; break;
case TYPETEXTE: case TYPETEXTE:
break; break;
...@@ -183,7 +192,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void* ...@@ -183,7 +192,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
break; break;
case TYPETEXTEMODULE: case TYPETEXTEMODULE:
{
module = (MODULE*) item->GetParent(); module = (MODULE*) item->GetParent();
if( m_Guide->IgnoreMTextsMarkedNoShow() && ((TEXTE_MODULE*)item)->m_NoShow ) if( m_Guide->IgnoreMTextsMarkedNoShow() && ((TEXTE_MODULE*)item)->m_NoShow )
...@@ -197,7 +205,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void* ...@@ -197,7 +205,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==LAYER_CMP_N ) if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==LAYER_CMP_N )
goto exit; goto exit;
} }
}
break; break;
case TYPEMODULE: case TYPEMODULE:
...@@ -234,7 +241,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void* ...@@ -234,7 +241,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
{ {
if( item->HitTest( m_RefPos ) ) if( item->HitTest( m_RefPos ) )
{ {
if ( ! skip_item ) Append( item ); Append( item );
goto exit; goto exit;
} }
} }
...@@ -261,7 +268,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void* ...@@ -261,7 +268,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
{ {
if( item->HitTest( m_RefPos ) ) if( item->HitTest( m_RefPos ) )
{ {
if ( ! skip_item ) Append2nd( item ); Append2nd( item );
goto exit; goto exit;
} }
} }
......
...@@ -147,6 +147,7 @@ public: ...@@ -147,6 +147,7 @@ public:
*/ */
virtual bool IgnoreModulesOnCmp() const = 0; virtual bool IgnoreModulesOnCmp() const = 0;
/** /**
* Function UseHitTesting * Function UseHitTesting
* @return bool - true if Inspect() should use BOARD_ITEM::HitTest() * @return bool - true if Inspect() should use BOARD_ITEM::HitTest()
...@@ -201,6 +202,12 @@ public: ...@@ -201,6 +202,12 @@ public:
static const KICAD_T AllBoardItems[]; static const KICAD_T AllBoardItems[];
/**
* A scan list for all editable board items, except zones
*/
static const KICAD_T AllButZones[];
/** /**
* A scan list for all primary board items, omitting items which are subordinate to * A scan list for all primary board items, omitting items which are subordinate to
* a MODULE, such as D_PAD and TEXTEMODULE. * a MODULE, such as D_PAD and TEXTEMODULE.
......
...@@ -153,9 +153,9 @@ static BOARD_ITEM* AllAreModulesAndReturnSmallestIfSo( GENERAL_COLLECTOR* aColle ...@@ -153,9 +153,9 @@ static BOARD_ITEM* AllAreModulesAndReturnSmallestIfSo( GENERAL_COLLECTOR* aColle
} }
/*************************************************************/ /****************************************************************************/
BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay() BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode )
/*************************************************************/ /****************************************************************************/
{ {
BOARD_ITEM* item; BOARD_ITEM* item;
...@@ -166,7 +166,11 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay() ...@@ -166,7 +166,11 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay()
const KICAD_T* scanList; const KICAD_T* scanList;
if( m_ID_current_state == 0 ) if( aHotKeyCode )
{
// switch here
}
else if( m_ID_current_state == 0 )
{ {
switch( m_HTOOL_current_state ) switch( m_HTOOL_current_state )
{ {
...@@ -175,7 +179,9 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay() ...@@ -175,7 +179,9 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay()
break; break;
default: default:
scanList = GENERAL_COLLECTOR::AllBoardItems; scanList = DisplayOpt.DisplayZones ?
GENERAL_COLLECTOR::AllBoardItems :
GENERAL_COLLECTOR::AllButZones;
break; break;
} }
} }
...@@ -196,26 +202,32 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay() ...@@ -196,26 +202,32 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay()
break; break;
default: default:
scanList = GENERAL_COLLECTOR::AllBoardItems; scanList = DisplayOpt.DisplayZones ?
GENERAL_COLLECTOR::AllBoardItems :
GENERAL_COLLECTOR::AllButZones;
} }
} }
m_Collector->Collect( m_Pcb, scanList, GetScreen()->RefPos( true ), guide ); m_Collector->Collect( m_Pcb, scanList, GetScreen()->RefPos( true ), guide );
/* debugging: print out the collected items, showing their priority order too. #if 0
* for( unsigned i=0; i<m_Collector->GetCount(); ++i ) // debugging: print out the collected items, showing their priority order too.
* (*m_Collector)[i]->Show( 0, std::cout ); for( unsigned i=0; i<m_Collector->GetCount(); ++i )
*/ (*m_Collector)[i]->Show( 0, std::cout );
#endif
/* Remove redundancies: most of time, zones are found twice, /* Remove redundancies: most of time, zones are found twice,
* because zones are filled twice ( once by by horizontal and once by vertical segments ) * because zones are filled twice ( once by by horizontal and once by vertical segments )
*/ */
unsigned long timestampzone = 0; unsigned long timestampzone = 0;
for( unsigned int ii = 0; ii < m_Collector->GetCount(); ii++ )
int limit = m_Collector->GetCount();
for( int ii = 0; ii < limit; ii++ )
{ {
item = (*m_Collector)[ii]; item = (*m_Collector)[ii];
if( item->Type() != TYPEZONE ) if( item->Type() != TYPEZONE )
continue; continue;
/* Found a TYPE ZONE */ /* Found a TYPE ZONE */
if( item->m_TimeStamp == timestampzone ) // Remove it, redundant, zone already found if( item->m_TimeStamp == timestampzone ) // Remove it, redundant, zone already found
{ {
...@@ -282,14 +294,6 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay() ...@@ -282,14 +294,6 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay()
} }
return item; return item;
/* old way:
*
* item = Locate( CURSEUR_OFF_GRILLE, GetScreen()->m_Active_Layer );
* if( item == NULL )
* item = Locate( CURSEUR_OFF_GRILLE, -1 );
* return item;
*/
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment