Commit 2a1b776b authored by CHARRAS's avatar CHARRAS

see changelog

parent df7e6f37
...@@ -5,6 +5,23 @@ Started 2007-June-11 ...@@ -5,6 +5,23 @@ 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.
2008-Feb-26 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema
changed in class DrawSheetStruct m_s member name to m_AssociatedScreen
some others minor problems solved.
some files "uncrustified"
Major problem in undo/redo when a sheet is deleted not yet solved
Only for a complex hierarchy, could lost data.
When a sheet is deleted by block delete. it is put in undo list.
It is really deleted after 10 changes (when the undo list is full).
At this time, the associated data is also deleted.
If an other (not deleted) sheet shares the same data, this data is lost.
Need work to solve this problem and keep the undo/redo feature.
2008-Feb-25 UPDATE Wayne Stambaugh <stambaughw{at}verizon{dot}net> 2008-Feb-25 UPDATE Wayne Stambaugh <stambaughw{at}verizon{dot}net>
================================================================================ ================================================================================
+eeschema +eeschema
......
...@@ -34,9 +34,6 @@ void ReAnnotatePowerSymbolsOnly( void ) ...@@ -34,9 +34,6 @@ void ReAnnotatePowerSymbolsOnly( void )
/* Build the screen list (screen, not sheet) */ /* Build the screen list (screen, not sheet) */
EDA_SheetList SheetList( NULL ); EDA_SheetList SheetList( NULL );
/* Update the screen number, sheet count and date */
//ScreenList.UpdateScreenNumberAndDate();
DrawSheetList* sheet; DrawSheetList* sheet;
int CmpNumber = 1; int CmpNumber = 1;
...@@ -161,7 +158,7 @@ void DeleteAnnotation( WinEDA_SchematicFrame* parent, bool annotateSchematic ) ...@@ -161,7 +158,7 @@ void DeleteAnnotation( WinEDA_SchematicFrame* parent, bool annotateSchematic )
sheet->DeleteAnnotation( annotateSchematic ); sheet->DeleteAnnotation( annotateSchematic );
g_RootSheet->m_s->SetModify(); g_RootSheet->m_AssociatedScreen->SetModify();
parent->DrawPanel->Refresh( true ); parent->DrawPanel->Refresh( true );
} }
...@@ -192,10 +189,11 @@ void AnnotateComponents( WinEDA_SchematicFrame* parent, ...@@ -192,10 +189,11 @@ void AnnotateComponents( WinEDA_SchematicFrame* parent,
/* Build the sheet list */ /* Build the sheet list */
EDA_SheetList SheetList( g_RootSheet ); EDA_SheetList SheetList( g_RootSheet );
/* Update the sheet number */ /* Update the screen number, sheet count and date */
ii = 0; SheetList.UpdateSheetNumberAndDate();
/* First pass: Component counting */ /* First pass: Component counting */
ii = 0;
sheet = parent->GetSheet(); sheet = parent->GetSheet();
if( annotateSchematic ) if( annotateSchematic )
{ {
...@@ -595,7 +593,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly ) ...@@ -595,7 +593,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly )
/* build the screen list */ /* build the screen list */
EDA_SheetList SheetList( NULL ); EDA_SheetList SheetList( NULL );
g_RootSheet->m_s->SetModify(); g_RootSheet->m_AssociatedScreen->SetModify();
ii = 0; ii = 0;
/* first pass : count composents */ /* first pass : count composents */
......
...@@ -258,7 +258,7 @@ void WinEDA_AnnotateFrame::OnClear( wxCommandEvent& event ) ...@@ -258,7 +258,7 @@ void WinEDA_AnnotateFrame::OnClear( wxCommandEvent& event )
message += _( "\n\nThis operation will clear the existing annotation " \ message += _( "\n\nThis operation will clear the existing annotation " \
"and cannot be undone." ); "and cannot be undone." );
response = wxMessageBox( message, _( "" ), response = wxMessageBox( message, wxT( "" ),
wxICON_EXCLAMATION | wxOK | wxCANCEL ); wxICON_EXCLAMATION | wxOK | wxCANCEL );
if (response == wxCANCEL) if (response == wxCANCEL)
return; return;
...@@ -283,7 +283,7 @@ void WinEDA_AnnotateFrame::OnApply( wxCommandEvent& event ) ...@@ -283,7 +283,7 @@ void WinEDA_AnnotateFrame::OnApply( wxCommandEvent& event )
message += _( "\n\nThis operation will change the current annotation and " \ message += _( "\n\nThis operation will change the current annotation and " \
"cannot be undone." ); "cannot be undone." );
response = wxMessageBox( message, _( "" ), response = wxMessageBox( message, wxT( "" ),
wxICON_EXCLAMATION | wxOK | wxCANCEL ); wxICON_EXCLAMATION | wxOK | wxCANCEL );
if (response == wxCANCEL) if (response == wxCANCEL)
return; return;
......
...@@ -832,12 +832,12 @@ static EDA_BaseStruct* CopyStruct( WinEDA_DrawPanel* panel, wxDC* DC, BASE_SCREE ...@@ -832,12 +832,12 @@ static EDA_BaseStruct* CopyStruct( WinEDA_DrawPanel* panel, wxDC* DC, BASE_SCREE
case DRAW_SHEET_STRUCT_TYPE: case DRAW_SHEET_STRUCT_TYPE:
{ {
//DuplicateStruct calls GenCopy, which should handle //DuplicateStruct calls GenCopy, which should handle
//m_s and m_sRefCount properly. //m_AssociatedScreen and m_sRefCount properly.
DrawSheetStruct* sheet = (DrawSheetStruct*) Struct; DrawSheetStruct* sheet = (DrawSheetStruct*) Struct;
sheet->m_TimeStamp = GetTimeStamp(); sheet->m_TimeStamp = GetTimeStamp();
//sheet->m_s->m_UndoList = NULL; //sheet->m_AssociatedScreen->m_UndoList = NULL;
//sheet->m_s->m_RedoList = NULL; //sheet->m_AssociatedScreen->m_RedoList = NULL;
//keep m_s pointer & associated. //keep m_AssociatedScreen pointer & associated.
//sheet->m_Son = NULL; m_son is involved in undo and redo. //sheet->m_Son = NULL; m_son is involved in undo and redo.
break; break;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -140,9 +140,7 @@ void EDA_SchComponentStruct::SetRef( DrawSheetList* sheet, wxString ref ) ...@@ -140,9 +140,7 @@ void EDA_SchComponentStruct::SetRef( DrawSheetList* sheet, wxString ref )
//check to see if it is already there before inserting it //check to see if it is already there before inserting it
wxString path = GetPath( sheet ); wxString path = GetPath( sheet );
printf( "SetRef path: %s ref: %s\n", // printf( "SetRef path: %s ref: %s\n", CONV_TO_UTF8( path ), CONV_TO_UTF8( ref ) ); // Debug
CONV_TO_UTF8( path ),
CONV_TO_UTF8( ref ) );
unsigned int i; unsigned int i;
bool notInArray = true; bool notInArray = true;
for( i = 0; i<m_Paths.GetCount(); i++ ) for( i = 0; i<m_Paths.GetCount(); i++ )
......
...@@ -28,8 +28,8 @@ enum NumFieldType { ...@@ -28,8 +28,8 @@ enum NumFieldType {
FIELD5, FIELD5,
FIELD6, FIELD6,
FIELD7, FIELD7,
FIELD8, FIELD8,
NUMBER_OF_FIELDS /* Nombre de champs de texte affectes au composant */ NUMBER_OF_FIELDS /* Nombre de champs de texte affectes au composant */
}; };
...@@ -37,7 +37,8 @@ enum NumFieldType { ...@@ -37,7 +37,8 @@ enum NumFieldType {
* component fields are texts attached to the component (not the graphic texts) * component fields are texts attached to the component (not the graphic texts)
* There are 2 major fields : Reference and Value * There are 2 major fields : Reference and Value
*/ */
class PartTextStruct : public EDA_BaseStruct, public EDA_TextStruct class PartTextStruct : public EDA_BaseStruct
, public EDA_TextStruct
{ {
public: public:
int m_Layer; int m_Layer;
...@@ -48,7 +49,7 @@ public: ...@@ -48,7 +49,7 @@ public:
public: public:
PartTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString ); PartTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString );
~PartTextStruct(); ~PartTextStruct();
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT( "PartText" ); return wxT( "PartText" );
...@@ -78,37 +79,38 @@ public: ...@@ -78,37 +79,38 @@ public:
wxPoint m_Pos; /* Exact position of part. */ wxPoint m_Pos; /* Exact position of part. */
public: public:
DrawPartStruct( KICAD_T struct_type, const wxPoint &pos ); DrawPartStruct( KICAD_T struct_type, const wxPoint& pos );
~DrawPartStruct(); ~DrawPartStruct();
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT( "DrawPart" ); return wxT( "DrawPart" );
} }
}; };
WX_DECLARE_OBJARRAY(DrawSheetList, ArrayOfSheetLists); WX_DECLARE_OBJARRAY( DrawSheetList, ArrayOfSheetLists );
/* the class EDA_SchComponentStruct describes a real component */ /* the class EDA_SchComponentStruct describes a real component */
class EDA_SchComponentStruct : public DrawPartStruct class EDA_SchComponentStruct : public DrawPartStruct
{ {
public: public:
int m_Multi; /* In multi unit chip - which unit to draw. */ int m_Multi; /* In multi unit chip - which unit to draw. */
//int m_FlagControlMulti; //int m_FlagControlMulti;
ArrayOfSheetLists m_UsedOnSheets; ArrayOfSheetLists m_UsedOnSheets;
int m_Convert; /* Gestion (management) des mutiples representations (ex: conversion De Morgan) */ int m_Convert; /* Gestion (management) des mutiples representations (ex: conversion De Morgan) */
int m_Transform[2][2]; /* The rotation/mirror transformation matrix. */ int m_Transform[2][2]; /* The rotation/mirror transformation matrix. */
bool* m_PinIsDangling; // liste des indicateurs de pin non connectee bool* m_PinIsDangling; // liste des indicateurs de pin non connectee
wxArrayString m_Paths; // /sheet1/C102, /sh2/sh1/U32 etc. wxArrayString m_Paths; // /sheet1/C102, /sh2/sh1/U32 etc.
wxArrayString m_References; // C102, U32 etc. wxArrayString m_References; // C102, U32 etc.
wxString m_PrefixString; //C, R, U, Q etc - the first character which typically indicates what the component is. wxString m_PrefixString; /*C, R, U, Q etc - the first character which typically indicates what the component is.
//determined, upon placement, from the library component. * determined, upon placement, from the library component.
//determined, upon file load, by the first non-digits in the reference fields. * determined, upon file load, by the first non-digits in the reference fields. */
public: public:
EDA_SchComponentStruct( const wxPoint& pos = wxPoint( 0, 0 ) ); EDA_SchComponentStruct( const wxPoint& pos = wxPoint( 0, 0 ) );
~EDA_SchComponentStruct( void ) { } ~EDA_SchComponentStruct( void ) { }
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT( "EDA_SchComponent" ); return wxT( "EDA_SchComponent" );
...@@ -124,7 +126,7 @@ public: ...@@ -124,7 +126,7 @@ public:
EDA_Rect GetBoundaryBox(); EDA_Rect GetBoundaryBox();
const wxString& ReturnFieldName( int aFieldNdx ) const; const wxString& ReturnFieldName( int aFieldNdx ) const;
/** /**
* Function GetFieldValue * Function GetFieldValue
...@@ -134,32 +136,35 @@ public: ...@@ -134,32 +136,35 @@ public:
*/ */
const wxString& GetFieldValue( int aFieldNdx ) const; const wxString& GetFieldValue( int aFieldNdx ) const;
virtual void Draw( WinEDA_DrawPanel* panel, virtual void Draw( WinEDA_DrawPanel* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int draw_mode, int draw_mode,
int Color = -1 ); int Color = -1 );
void SwapData( EDA_SchComponentStruct* copyitem ); void SwapData( EDA_SchComponentStruct* copyitem );
virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC ); virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC );
//returns a unique ID, in the form of a path. //returns a unique ID, in the form of a path.
wxString GetPath( DrawSheetList* sheet); wxString GetPath( DrawSheetList* sheet );
const wxString GetRef( DrawSheetList* sheet ); const wxString GetRef( DrawSheetList* sheet );
void SetRef( DrawSheetList* sheet, wxString ref ); void SetRef( DrawSheetList* sheet, wxString ref );
void ClearRefs(); void ClearRefs();
#if defined(DEBUG)
#if defined (DEBUG)
/** /**
* Function Show * Function Show
* is used to output the object tree, currently for debugging only. * is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level * @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree. * of nesting of this object within the overall tree.
* @param os The ostream& to output to. * @param os The ostream& to output to.
*/ */
void Show( int nestLevel, std::ostream& os ); void Show( int nestLevel, std::ostream& os );
#endif
#endif
}; };
......
...@@ -37,20 +37,20 @@ wxString msg; ...@@ -37,20 +37,20 @@ wxString msg;
} }
/* effacement du sous schema correspondant */ /* effacement du sous schema correspondant */
if( FirstSheet->m_s->IsModify() && confirm_deletion ) if( FirstSheet->m_AssociatedScreen->IsModify() && confirm_deletion )
{ {
msg.Printf( _("Sheet %s (file %s) modified. Save it?"), msg.Printf( _("Sheet %s (file %s) modified. Save it?"),
FirstSheet->m_SheetName.GetData(), FirstSheet->m_SheetName.GetData(),
FirstSheet->m_FileName.GetData()); FirstSheet->m_FileName.GetData());
if( IsOK(NULL, msg) ) if( IsOK(NULL, msg) )
{ {
frame->SaveEEFile(FirstSheet->m_s, FILE_SAVE_AS); frame->SaveEEFile(FirstSheet->m_AssociatedScreen, FILE_SAVE_AS);
} }
} }
/* free the sub hierarchy */ /* free the sub hierarchy */
if(FirstSheet->m_s){ if(FirstSheet->m_AssociatedScreen){
EEDrawList = FirstSheet->m_s->EEDrawList; EEDrawList = FirstSheet->m_AssociatedScreen->EEDrawList;
while (EEDrawList != NULL) while (EEDrawList != NULL)
{ {
DrawStruct = EEDrawList; DrawStruct = EEDrawList;
...@@ -61,7 +61,7 @@ wxString msg; ...@@ -61,7 +61,7 @@ wxString msg;
} }
} }
/* Effacement des elements de la feuille courante */ /* Effacement des elements de la feuille courante */
FirstSheet->m_s->FreeDrawList(); FirstSheet->m_AssociatedScreen->FreeDrawList();
} }
} }
......
...@@ -544,7 +544,7 @@ wxString mask, filename; ...@@ -544,7 +544,7 @@ wxString mask, filename;
else else
s_ExportSeparatorSymbol = s_ExportSeparator[0]; s_ExportSeparatorSymbol = s_ExportSeparator[0];
m_ListFileName = g_RootSheet->m_s->m_FileName; m_ListFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
ChangeFileNameExt(m_ListFileName, EXT_LIST); ChangeFileNameExt(m_ListFileName, EXT_LIST);
//need to get rid of the path. //need to get rid of the path.
m_ListFileName = m_ListFileName.AfterLast('/'); m_ListFileName = m_ListFileName.AfterLast('/');
......
This diff is collapsed.
...@@ -129,7 +129,7 @@ wxString title; ...@@ -129,7 +129,7 @@ wxString title;
void WinEDA_DrawPanel::PrintPage(wxDC * DC, bool Print_Sheet_Ref, int PrintMask) void WinEDA_DrawPanel::PrintPage(wxDC * DC, bool Print_Sheet_Ref, int PrintMask)
/*******************************************************************************/ /*******************************************************************************/
{ {
BASE_SCREEN * screen; // * oldscreen = m_Parent->GetScreen(); BASE_SCREEN * screen;
wxBeginBusyCursor(); wxBeginBusyCursor();
...@@ -140,7 +140,6 @@ BASE_SCREEN * screen; // * oldscreen = m_Parent->GetScreen(); ...@@ -140,7 +140,6 @@ BASE_SCREEN * screen; // * oldscreen = m_Parent->GetScreen();
if ( Print_Sheet_Ref ) if ( Print_Sheet_Ref )
m_Parent->TraceWorkSheet(DC, screen, g_DrawMinimunLineWidth ); m_Parent->TraceWorkSheet(DC, screen, g_DrawMinimunLineWidth );
//m_Parent->m_CurrentSheet->m_s = oldscreen;
wxEndBusyCursor(); wxEndBusyCursor();
} }
......
...@@ -400,7 +400,7 @@ void WinEDA_ErcFrame::TestErc( wxCommandEvent& event ) ...@@ -400,7 +400,7 @@ void WinEDA_ErcFrame::TestErc( wxCommandEvent& event )
if( WriteFichierERC == TRUE ) if( WriteFichierERC == TRUE )
{ {
wxString ErcFullFileName; wxString ErcFullFileName;
ErcFullFileName = g_RootSheet->m_s->m_FileName; ErcFullFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
ChangeFileNameExt( ErcFullFileName, wxT( ".erc" ) ); ChangeFileNameExt( ErcFullFileName, wxT( ".erc" ) );
ErcFullFileName = EDA_FileSelector( _( "ERC file:" ), ErcFullFileName = EDA_FileSelector( _( "ERC file:" ),
wxEmptyString, /* Chemin par defaut */ wxEmptyString, /* Chemin par defaut */
......
...@@ -63,7 +63,7 @@ void WinEDA_SchematicFrame::Save_File( wxCommandEvent& event ) ...@@ -63,7 +63,7 @@ void WinEDA_SchematicFrame::Save_File( wxCommandEvent& event )
mask = wxT( "*" ) + g_SchExtBuffer; mask = wxT( "*" ) + g_SchExtBuffer;
FullFileName = EDA_FileSelector( _( "Schematic files:" ), FullFileName = EDA_FileSelector( _( "Schematic files:" ),
wxEmptyString, //default path wxEmptyString, //default path
sheet->m_s->m_FileName,// default filename sheet->m_AssociatedScreen->m_FileName,// default filename
g_SchExtBuffer, // extension par defaut g_SchExtBuffer, // extension par defaut
mask, // Masque d'affichage mask, // Masque d'affichage
this, this,
...@@ -111,8 +111,8 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe ...@@ -111,8 +111,8 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe
{ {
if( !IsOK( this, _( "Clear Schematic Hierarchy (modified!)?" ) ) ) if( !IsOK( this, _( "Clear Schematic Hierarchy (modified!)?" ) ) )
return FALSE; return FALSE;
if( g_RootSheet->m_s->m_FileName != g_DefaultSchematicFileName ) if( g_RootSheet->m_AssociatedScreen->m_FileName != g_DefaultSchematicFileName )
SetLastProject( g_RootSheet->m_s->m_FileName ); SetLastProject( g_RootSheet->m_AssociatedScreen->m_FileName );
} }
FullFileName = FileName; FullFileName = FileName;
...@@ -146,7 +146,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe ...@@ -146,7 +146,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe
memset( &g_EESchemaVar, 0, sizeof(g_EESchemaVar) ); memset( &g_EESchemaVar, 0, sizeof(g_EESchemaVar) );
GetScreen()->ClrModify(); GetScreen()->ClrModify();
//m_CurrentSheet->m_s->Pnext = NULL; should be by default //m_CurrentSheet->m_AssociatedScreen->Pnext = NULL; should be by default
if( IsNew ) if( IsNew )
{ {
...@@ -190,7 +190,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe ...@@ -190,7 +190,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe
// Loading the project library cache // Loading the project library cache
wxString FullLibName; wxString FullLibName;
wxString shortfilename; wxString shortfilename;
wxSplitPath( g_RootSheet->m_s->m_FileName, NULL, &shortfilename, NULL ); wxSplitPath( g_RootSheet->m_AssociatedScreen->m_FileName, NULL, &shortfilename, NULL );
FullLibName << wxT( "." ) << STRING_DIR_SEP << shortfilename << wxT( ".cache" ) << FullLibName << wxT( "." ) << STRING_DIR_SEP << shortfilename << wxT( ".cache" ) <<
g_LibExtBuffer; g_LibExtBuffer;
if( wxFileExists( FullLibName ) ) if( wxFileExists( FullLibName ) )
...@@ -211,16 +211,16 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe ...@@ -211,16 +211,16 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsNe
LibCacheExist = TRUE; LibCacheExist = TRUE;
} }
if( !wxFileExists( g_RootSheet->m_s->m_FileName ) && !LibCacheExist ) // Nouveau projet prpbablement if( !wxFileExists( g_RootSheet->m_AssociatedScreen->m_FileName ) && !LibCacheExist ) // Nouveau projet prpbablement
{ {
msg.Printf( _( "File %s not found (new project ?)" ), msg.Printf( _( "File %s not found (new project ?)" ),
g_RootSheet->m_s->m_FileName.GetData() ); g_RootSheet->m_AssociatedScreen->m_FileName.GetData() );
DisplayInfo( this, msg, 20 ); DisplayInfo( this, msg, 20 );
return -1; return -1;
} }
//load the project. //load the project.
SAFE_DELETE(g_RootSheet->m_s); SAFE_DELETE(g_RootSheet->m_AssociatedScreen);
if(!g_RootSheet->Load(this)) if(!g_RootSheet->Load(this))
return 0; return 0;
......
...@@ -273,7 +273,7 @@ void WinEDA_SchematicFrame::InstallNextScreen(DrawSheetStruct * Sheet) ...@@ -273,7 +273,7 @@ void WinEDA_SchematicFrame::InstallNextScreen(DrawSheetStruct * Sheet)
/* Routine d'installation de l'ecran correspondant au symbole Sheet pointe /* Routine d'installation de l'ecran correspondant au symbole Sheet pointe
par la souris par la souris
have to be careful here because the DrawSheetStructs within the EEDrawList have to be careful here because the DrawSheetStructs within the EEDrawList
don't actually have a valid m_s (on purpose -- you need the m_SubSheet hierarchy don't actually have a valid m_AssociatedScreen (on purpose -- you need the m_SubSheet hierarchy
to maintain path info (well, this is but one way to maintain path info..) to maintain path info (well, this is but one way to maintain path info..)
*/ */
{ {
...@@ -297,11 +297,10 @@ static void UpdateScreenFromSheet(WinEDA_SchematicFrame * frame) ...@@ -297,11 +297,10 @@ static void UpdateScreenFromSheet(WinEDA_SchematicFrame * frame)
{ {
SCH_SCREEN * NewScreen; SCH_SCREEN * NewScreen;
//SCH_SCREEN * oldscreen = frame->GetScreen(); what is oldscreen used for?
NewScreen = frame->m_CurrentSheet->LastScreen(); NewScreen = frame->m_CurrentSheet->LastScreen();
if(!NewScreen) if(!NewScreen)
NewScreen = g_RootSheet->m_s; NewScreen = g_RootSheet->m_AssociatedScreen;
// Reinit des parametres d'affichage du nouvel ecran // Reinit des parametres d'affichage du nouvel ecran
// assumes m_CurrentSheet has already been updated. // assumes m_CurrentSheet has already been updated.
......
...@@ -656,6 +656,7 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -656,6 +656,7 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
{ {
EditField( &dc, (LibDrawField*) CurrentDrawItem ); EditField( &dc, (LibDrawField*) CurrentDrawItem );
} }
DrawPanel->MouseToCursorSchema();
DrawPanel->CursorOn( &dc ); DrawPanel->CursorOn( &dc );
break; break;
...@@ -725,7 +726,6 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -725,7 +726,6 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
break; break;
} }
DrawPanel->MouseToCursorSchema();
DrawPanel->m_IgnoreMouseEvents = FALSE; DrawPanel->m_IgnoreMouseEvents = FALSE;
if( m_ID_current_state == 0 ) if( m_ID_current_state == 0 )
......
...@@ -65,7 +65,9 @@ OBJECTS = eeschema.o\ ...@@ -65,7 +65,9 @@ OBJECTS = eeschema.o\
savelib.o symbtext.o \ savelib.o symbtext.o \
symbdraw.o \ symbdraw.o \
hierarch.o files-io.o \ hierarch.o files-io.o \
annotate.o plothpgl.o \ annotate.o\
annotate_dialog.o\
plothpgl.o \
plot.o libalias.o \ plot.o libalias.o \
plotps.o netform.o \ plotps.o netform.o \
delsheet.o \ delsheet.o \
...@@ -110,7 +112,9 @@ find.o:find.cpp dialog_find.cpp dialog_find.h $(DEPEND) ...@@ -110,7 +112,9 @@ find.o:find.cpp dialog_find.cpp dialog_find.h $(DEPEND)
eeconfig.o: eeconfig.cpp eeconfig.h $(DEPEND) eeconfig.o: eeconfig.cpp eeconfig.h $(DEPEND)
annotate.o: annotate.cpp annotate_dialog.cpp annotate_dialog.h $(DEPEND) netlist.h annotate.o: annotate.cpp annotate_dialog.h $(DEPEND) netlist.h
annotate_dialog.o: annotate_dialog.cpp annotate_dialog.h $(DEPEND) netlist.h
netlist.o: netlist.cpp $(DEPEND) netlist.h netlist.o: netlist.cpp $(DEPEND) netlist.h
......
...@@ -170,7 +170,7 @@ void* WinEDA_SchematicFrame::BuildNetListBase() ...@@ -170,7 +170,7 @@ void* WinEDA_SchematicFrame::BuildNetListBase()
g_TabObjNet = NULL; /* Init pour le 1er passage dans ListeObjetConnection */ g_TabObjNet = NULL; /* Init pour le 1er passage dans ListeObjetConnection */
/* count nelist items */ /* count nelist items */
g_RootSheet->m_s->SetModify(); g_RootSheet->m_AssociatedScreen->SetModify();
for( sheet = SheetListList.GetFirst(); sheet != NULL; sheet = SheetListList.GetNext() ) for( sheet = SheetListList.GetFirst(); sheet != NULL; sheet = SheetListList.GetNext() )
{ {
......
...@@ -539,7 +539,7 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event ) ...@@ -539,7 +539,7 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
g_NetFormat = CurrPage->m_IdNetType; g_NetFormat = CurrPage->m_IdNetType;
/* Calculate the netlist filename */ /* Calculate the netlist filename */
FullFileName = g_RootSheet->m_s->m_FileName; FullFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
switch( g_NetFormat ) switch( g_NetFormat )
{ {
...@@ -649,7 +649,7 @@ void WinEDA_NetlistFrame::RunSimulator( wxCommandEvent& event ) ...@@ -649,7 +649,7 @@ void WinEDA_NetlistFrame::RunSimulator( wxCommandEvent& event )
CommandLine = g_SimulatorCommandLine.AfterFirst( ' ' ); CommandLine = g_SimulatorCommandLine.AfterFirst( ' ' );
/* Calculate the netlist filename */ /* Calculate the netlist filename */
NetlistFullFileName = g_RootSheet->m_s->m_FileName; NetlistFullFileName = g_RootSheet->m_AssociatedScreen->m_FileName;
ChangeFileNameExt( NetlistFullFileName, wxT( ".cir" ) ); ChangeFileNameExt( NetlistFullFileName, wxT( ".cir" ) );
AddDelimiterString( NetlistFullFileName ); AddDelimiterString( NetlistFullFileName );
CommandLine += wxT( " " ) + NetlistFullFileName; CommandLine += wxT( " " ) + NetlistFullFileName;
......
...@@ -209,7 +209,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -209,7 +209,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_TO_PCB: case ID_TO_PCB:
{ {
wxString Line; wxString Line;
if( g_RootSheet->m_s->m_FileName != wxEmptyString ) if( g_RootSheet->m_AssociatedScreen->m_FileName != wxEmptyString )
{ {
Line = GetScreen()->m_FileName; Line = GetScreen()->m_FileName;
AddDelimiterString( Line ); AddDelimiterString( Line );
...@@ -224,9 +224,9 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -224,9 +224,9 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_TO_CVPCB: case ID_TO_CVPCB:
{ {
wxString Line; wxString Line;
if( g_RootSheet->m_s->m_FileName != wxEmptyString ) if( g_RootSheet->m_AssociatedScreen->m_FileName != wxEmptyString )
{ {
Line = g_RootSheet->m_s->m_FileName; Line = g_RootSheet->m_AssociatedScreen->m_FileName;
AddDelimiterString( Line ); AddDelimiterString( Line );
ChangeFileNameExt( Line, wxEmptyString ); ChangeFileNameExt( Line, wxEmptyString );
ExecuteFile( this, CVPCB_EXE, Line ); ExecuteFile( this, CVPCB_EXE, Line );
......
...@@ -16,40 +16,40 @@ ...@@ -16,40 +16,40 @@
/* Functions to undo and redo edit commands. /* Functions to undo and redo edit commands.
* commmands to undo are in CurrentScreen->m_UndoList * commmands to undo are in CurrentScreen->m_UndoList
* commmands to redo are in CurrentScreen->m_RedoList * commmands to redo are in CurrentScreen->m_RedoList
* *
* m_UndoList and m_RedoList are a linked list of DrawPickedStruct. * m_UndoList and m_RedoList are a linked list of DrawPickedStruct.
* each DrawPickedStruct has its .m_Son member pointing to an item to undo or redo, * each DrawPickedStruct has its .m_Son member pointing to an item to undo or redo,
* or to a list of DrawPickedStruct which points (.m_PickedStruct membre) * or to a list of DrawPickedStruct which points (.m_PickedStruct membre)
* the items to undo or redo * the items to undo or redo
* *
* there are 3 cases: * there are 3 cases:
* - delete item(s) command * - delete item(s) command
* - change item(s) command * - change item(s) command
* - add item(s) command * - add item(s) command
* *
* Undo command * Undo command
* - delete item(s) command: * - delete item(s) command:
* deleted items are moved in undo list * deleted items are moved in undo list
* *
* - change item(s) command * - change item(s) command
* A copy of item(s) is made (a DrawPickedStruct list of wrappers) * A copy of item(s) is made (a DrawPickedStruct list of wrappers)
* the .m_Image member of each wrapper points the modified item. * the .m_Image member of each wrapper points the modified item.
* *
* - add item(s) command * - add item(s) command
* A list of item(s) is made * A list of item(s) is made
* the .m_Image member of each wrapper points the new item. * the .m_Image member of each wrapper points the new item.
* *
* Redo command * Redo command
* - delete item(s) old command: * - delete item(s) old command:
* deleted items are moved in EEDrawList list * deleted items are moved in EEDrawList list
* *
* - change item(s) command * - change item(s) command
* the copy of item(s) is moved in Undo list * the copy of item(s) is moved in Undo list
* *
* - add item(s) command * - add item(s) command
* The list of item(s) is used to create a deleted list in undo list * The list of item(s) is used to create a deleted list in undo list
* (same as a delete command) * (same as a delete command)
* *
* A problem is the hierarchical sheet handling. * A problem is the hierarchical sheet handling.
* the data associated (subhierarchy, uno/redo list) is deleted only * the data associated (subhierarchy, uno/redo list) is deleted only
* when the sheet is really deleted (i.e. when deleted from undo or redo list) * when the sheet is really deleted (i.e. when deleted from undo or redo list)
...@@ -90,7 +90,7 @@ void SwapData( EDA_BaseStruct* Item ) ...@@ -90,7 +90,7 @@ void SwapData( EDA_BaseStruct* Item )
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
case DRAW_HIER_LABEL_STRUCT_TYPE: case DRAW_HIER_LABEL_STRUCT_TYPE:
case DRAW_TEXT_STRUCT_TYPE: case DRAW_TEXT_STRUCT_TYPE:
#undef SOURCE #undef SOURCE
#undef DEST #undef DEST
...@@ -181,20 +181,20 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, ...@@ -181,20 +181,20 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
/* Create a copy of the current schematic draw list, and put it in the undo list. /* Create a copy of the current schematic draw list, and put it in the undo list.
* A DrawPickedStruct wrapper is created to handle the draw list. * A DrawPickedStruct wrapper is created to handle the draw list.
* the .m_Son of this wrapper points the list of items * the .m_Son of this wrapper points the list of items
* *
* flag_type_command = * flag_type_command =
* 0 (unspecified) * 0 (unspecified)
* IS_CHANGED * IS_CHANGED
* IS_NEW * IS_NEW
* IS_DELETED * IS_DELETED
* IS_WIRE_IMAGE * IS_WIRE_IMAGE
* *
* for 0: only a wrapper is created. The used must init the .Flags member of the * for 0: only a wrapper is created. The used must init the .Flags member of the
* wrapper, and add the item list to the wrapper * wrapper, and add the item list to the wrapper
* If it is a delete command, items are put on list with the .Flags member set to IS_DELETED. * If it is a delete command, items are put on list with the .Flags member set to IS_DELETED.
* When it will be really deleted, the EEDrawList and the subhierarchy will be deleted. * When it will be really deleted, the EEDrawList and the subhierarchy will be deleted.
* If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted. * If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted.
* *
* Note: * Note:
* Edit wires and busses is a bit complex. * Edit wires and busses is a bit complex.
* because when a new wire is added, modifications in wire list * because when a new wire is added, modifications in wire list
...@@ -286,13 +286,13 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, ...@@ -286,13 +286,13 @@ void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
GetScreen()->AddItemToUndoList( NewList ); GetScreen()->AddItemToUndoList( NewList );
/* Clear redo list, because after new save there is no redo to do */ /* Clear redo list, because after new save there is no redo to do */
((SCH_SCREEN*)GetScreen())->ClearUndoORRedoList( GetScreen()->m_RedoList ); ( (SCH_SCREEN*) GetScreen() )->ClearUndoORRedoList( GetScreen()->m_RedoList );
GetScreen()->m_RedoList = NULL; GetScreen()->m_RedoList = NULL;
} }
/**********************************************************/ /**********************************************************/
bool WinEDA_SchematicFrame::GetSchematicFromRedoList() bool WinEDA_SchematicFrame::GetSchematicFromRedoList()
/**********************************************************/ /**********************************************************/
/* Redo the last edition: /* Redo the last edition:
...@@ -314,8 +314,8 @@ bool WinEDA_SchematicFrame::GetSchematicFromRedoList() ...@@ -314,8 +314,8 @@ bool WinEDA_SchematicFrame::GetSchematicFromRedoList()
GetScreen()->SetModify(); GetScreen()->SetModify();
ReCreateHToolbar(); ReCreateHToolbar();
SetToolbars(); SetToolbars();
return TRUE; return TRUE;
} }
...@@ -362,7 +362,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List ) ...@@ -362,7 +362,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
while( PickedList ) while( PickedList )
{ {
item = PickedList->m_Image; item = PickedList->m_Image;
((SCH_SCREEN*)GetScreen())->RemoveFromDrawList( item ); ( (SCH_SCREEN*) GetScreen() )->RemoveFromDrawList( item );
item->m_Flags = IS_DELETED; item->m_Flags = IS_DELETED;
PickedList->m_PickedStruct = item; PickedList->m_PickedStruct = item;
PickedList->m_Flags = IS_DELETED; PickedList->m_Flags = IS_DELETED;
...@@ -372,7 +372,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List ) ...@@ -372,7 +372,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
else else
{ {
FirstItem = List->m_Image; FirstItem = List->m_Image;
((SCH_SCREEN*)GetScreen())->RemoveFromDrawList( FirstItem ); ( (SCH_SCREEN*) GetScreen() )->RemoveFromDrawList( FirstItem );
FirstItem->m_Flags = IS_DELETED; FirstItem->m_Flags = IS_DELETED;
List->m_Son = FirstItem; List->m_Son = FirstItem;
} }
...@@ -407,7 +407,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List ) ...@@ -407,7 +407,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
case IS_WIRE_IMAGE: case IS_WIRE_IMAGE:
/* Exchange the current wires and the oild wires */ /* Exchange the current wires and the oild wires */
List->m_Son = ((SCH_SCREEN*)GetScreen())->ExtractWires( FALSE ); List->m_Son = ( (SCH_SCREEN*) GetScreen() )->ExtractWires( FALSE );
while( FirstItem ) while( FirstItem )
{ {
EDA_BaseStruct* nextitem = FirstItem->Pnext; EDA_BaseStruct* nextitem = FirstItem->Pnext;
...@@ -437,7 +437,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List ) ...@@ -437,7 +437,7 @@ void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
case IS_NEW: case IS_NEW:
item = PickedList->m_Image; item = PickedList->m_Image;
((SCH_SCREEN*)GetScreen())->RemoveFromDrawList( item ); ( (SCH_SCREEN*) GetScreen() )->RemoveFromDrawList( item );
item->m_Flags = IS_DELETED; item->m_Flags = IS_DELETED;
PickedList->m_PickedStruct = item; PickedList->m_PickedStruct = item;
PickedList->m_Flags = IS_DELETED; PickedList->m_Flags = IS_DELETED;
...@@ -489,8 +489,8 @@ bool WinEDA_SchematicFrame::GetSchematicFromUndoList() ...@@ -489,8 +489,8 @@ bool WinEDA_SchematicFrame::GetSchematicFromUndoList()
GetScreen()->SetModify(); GetScreen()->SetModify();
ReCreateHToolbar(); ReCreateHToolbar();
SetToolbars(); SetToolbars();
return TRUE; return TRUE;
} }
...@@ -517,7 +517,7 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List ) ...@@ -517,7 +517,7 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List )
FirstItem = List->m_Son; FirstItem = List->m_Son;
CmdType = List->m_Flags; CmdType = List->m_Flags;
SAFE_DELETE( List ); SAFE_DELETE( List );
if( FirstItem == NULL ) if( FirstItem == NULL )
continue; continue;
...@@ -542,22 +542,25 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List ) ...@@ -542,22 +542,25 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List )
{ {
if( (item->m_Flags & IS_NEW) == 0 ) if( (item->m_Flags & IS_NEW) == 0 )
{ {
printf("schematic undo_redo.cpp: undo_redo with a DRAW_SHEET_STRUCT_TYPE, checkme!!\n"); printf(
/* "schematic undo_redo.cpp: undo_redo with a DRAW_SHEET_STRUCT_TYPE, checkme!!\n" );
sheet->EEDrawList = NULL;
sheet->m_UndoList = NULL; /*
sheet->m_RedoList = NULL; * sheet->EEDrawList = NULL;
*/ * sheet->m_UndoList = NULL;
* sheet->m_RedoList = NULL;
*/
} }
} }
} }
if( (item->m_Flags & IS_NEW) == 0 ){ if( (item->m_Flags & IS_NEW) == 0 )
SAFE_DELETE( item ); {
} SAFE_DELETE( item );
}
} }
DrawPickedStruct* wrapper = PickedList; DrawPickedStruct* wrapper = PickedList;
PickedList = PickedList->Next(); PickedList = PickedList->Next();
SAFE_DELETE( wrapper ); SAFE_DELETE( wrapper );
} }
} }
else // This is a single item: deleted copy else // This is a single item: deleted copy
...@@ -583,18 +586,21 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List ) ...@@ -583,18 +586,21 @@ void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List )
{ {
if( (FirstItem->m_Flags & IS_NEW) == 0 ) if( (FirstItem->m_Flags & IS_NEW) == 0 )
{ {
printf("schematic undo_redo.cpp undo_redo with a DRAW_SHEET_STRUCT_TYPE, checkme!!\n"); printf(
/* "schematic undo_redo.cpp undo_redo with a DRAW_SHEET_STRUCT_TYPE, checkme!!\n" );
sheet->EEDrawList = NULL;
sheet->m_UndoList = NULL; /*
sheet->m_RedoList = NULL; * sheet->EEDrawList = NULL;
*/ * sheet->m_UndoList = NULL;
* sheet->m_RedoList = NULL;
*/
} }
} }
} }
if( (FirstItem->m_Flags & IS_NEW) == 0 ){ if( (FirstItem->m_Flags & IS_NEW) == 0 )
SAFE_DELETE( FirstItem ); {
} SAFE_DELETE( FirstItem );
}
} }
} }
} }
......
...@@ -215,22 +215,22 @@ wxString WinEDA_SchematicFrame::GetScreenDesc() ...@@ -215,22 +215,22 @@ wxString WinEDA_SchematicFrame::GetScreenDesc()
} }
/******************************/ /*******************************************/
void WinEDA_SchematicFrame::CreateScreens() void WinEDA_SchematicFrame::CreateScreens()
/******************************/ /*******************************************/
{ {
/* creation des ecrans Sch , Lib */ /* creation des ecrans Sch , Lib */
if( g_RootSheet == NULL ) if( g_RootSheet == NULL )
{ {
g_RootSheet = new DrawSheetStruct(); g_RootSheet = new DrawSheetStruct();
} }
if( g_RootSheet->m_s == NULL ) if( g_RootSheet->m_AssociatedScreen == NULL )
{ {
g_RootSheet->m_s = new SCH_SCREEN( SCHEMATIC_FRAME ); g_RootSheet->m_AssociatedScreen = new SCH_SCREEN( SCHEMATIC_FRAME );
g_RootSheet->m_s->m_RefCount++; g_RootSheet->m_AssociatedScreen->m_RefCount++;
} }
g_RootSheet->m_s->m_FileName = g_DefaultSchematicFileName; g_RootSheet->m_AssociatedScreen->m_FileName = g_DefaultSchematicFileName;
g_RootSheet->m_s->m_Date = GenDate(); g_RootSheet->m_AssociatedScreen->m_Date = GenDate();
m_CurrentSheet->Clear(); m_CurrentSheet->Clear();
m_CurrentSheet->Push( g_RootSheet ); m_CurrentSheet->Push( g_RootSheet );
...@@ -294,10 +294,11 @@ void WinEDA_SchematicFrame::OnCloseWindow( wxCloseEvent& Event ) ...@@ -294,10 +294,11 @@ void WinEDA_SchematicFrame::OnCloseWindow( wxCloseEvent& Event )
} }
} }
if( !GetScreen()->m_FileName.IsEmpty() && (GetScreen()->EEDrawList != NULL) ) if( !g_RootSheet->m_AssociatedScreen->m_FileName.IsEmpty() &&
SetLastProject( GetScreen()->m_FileName ); (g_RootSheet->m_AssociatedScreen->EEDrawList != NULL) )
SetLastProject( g_RootSheet->m_AssociatedScreen->m_FileName );
ClearProjectDrawList( g_RootSheet->m_s, TRUE ); ClearProjectDrawList( g_RootSheet->m_AssociatedScreen, TRUE );
/* allof sub sheets are deleted, only the main sheet is useable */ /* allof sub sheets are deleted, only the main sheet is useable */
m_CurrentSheet->Clear(); m_CurrentSheet->Clear();
......
This diff is collapsed.
...@@ -358,8 +358,8 @@ DrawSheetLabelStruct* WinEDA_SchematicFrame::Import_PinSheet( DrawSheetStruct* S ...@@ -358,8 +358,8 @@ DrawSheetLabelStruct* WinEDA_SchematicFrame::Import_PinSheet( DrawSheetStruct* S
DrawSheetLabelStruct* NewSheetLabel, * SheetLabel = NULL; DrawSheetLabelStruct* NewSheetLabel, * SheetLabel = NULL;
DrawHierLabelStruct* HLabel = NULL; DrawHierLabelStruct* HLabel = NULL;
if(!Sheet->m_s) return NULL; if(!Sheet->m_AssociatedScreen) return NULL;
DrawStruct = Sheet->m_s->EEDrawList; DrawStruct = Sheet->m_AssociatedScreen->EEDrawList;
HLabel = NULL; HLabel = NULL;
for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext ) for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{ {
......
No preview for this file type
This diff is collapsed.
This diff is collapsed.
...@@ -63,9 +63,9 @@ static std::vector<HOLE_INFO> s_HoleListBuffer; ...@@ -63,9 +63,9 @@ static std::vector<HOLE_INFO> s_HoleListBuffer;
#include "dialog_gendrill.cpp" // Dialog box for drill file generation #include "dialog_gendrill.cpp" // Dialog box for drill file generation
/**********************************************/ /************************************************/
void WinEDA_DrillFrame::InitDisplayParams( void ) void WinEDA_DrillFrame::InitDisplayParams( void )
/**********************************************/ /************************************************/
/* some param values initialisation before display dialog window /* some param values initialisation before display dialog window
*/ */
...@@ -121,8 +121,6 @@ void WinEDA_DrillFrame::InitDisplayParams( void ) ...@@ -121,8 +121,6 @@ void WinEDA_DrillFrame::InitDisplayParams( void )
m_MicroViasDrillSizer->Enable( m_MicroViasCount ); m_MicroViasDrillSizer->Enable( m_MicroViasCount );
m_MicroViaDrillValue->Enable( m_MicroViasCount ); m_MicroViaDrillValue->Enable( m_MicroViasCount );
/* Display statistics */
// Pads holes cound: // Pads holes cound:
m_PadsHoleCount = 0; m_PadsHoleCount = 0;
for( MODULE* module = m_Parent->m_Pcb->m_Modules; module != NULL; module = module->Next() ) for( MODULE* module = m_Parent->m_Pcb->m_Modules; module != NULL; module = module->Next() )
...@@ -133,10 +131,10 @@ void WinEDA_DrillFrame::InitDisplayParams( void ) ...@@ -133,10 +131,10 @@ void WinEDA_DrillFrame::InitDisplayParams( void )
{ {
if( pad->m_Drill.x != 0 ) if( pad->m_Drill.x != 0 )
m_PadsHoleCount++; m_PadsHoleCount++;
else }
else
if( MIN( pad->m_Drill.x, pad->m_Drill.y ) != 0 ) if( MIN( pad->m_Drill.x, pad->m_Drill.y ) != 0 )
m_PadsHoleCount++; m_PadsHoleCount++;
}
} }
} }
......
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