Commit ea755a10 authored by jean-pierre charras's avatar jean-pierre charras

.kicad_mod files: always save the "last edited date" because only the...

.kicad_mod files: always save the "last edited date" because only the footprint editor changes this parameter. Usefull to know if/when a footprint was actually modified.
Also fix a minor issue in footprint editor which always set the "modified" flag even when no change was made.
parent fa846932
...@@ -978,10 +978,11 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const ...@@ -978,10 +978,11 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const
formatLayer( aModule ); formatLayer( aModule );
m_out->Print( 0, " (tedit %lX)", aModule->GetLastEditTime() );
if( !( m_ctl & CTL_OMIT_TSTAMPS ) ) if( !( m_ctl & CTL_OMIT_TSTAMPS ) )
{ {
m_out->Print( 0, " (tedit %lX) (tstamp %lX)\n", m_out->Print( 0, " (tstamp %lX)\n", aModule->GetTimeStamp() );
aModule->GetLastEditTime(), aModule->GetTimeStamp() );
} }
else else
m_out->Print( 0, "\n" ); m_out->Print( 0, "\n" );
......
...@@ -40,11 +40,12 @@ class NETINFO_MAPPING; ...@@ -40,11 +40,12 @@ class NETINFO_MAPPING;
#define CTL_STD_LAYER_NAMES (1 << 0) ///< Use English Standard layer names #define CTL_STD_LAYER_NAMES (1 << 0) ///< Use English Standard layer names
#define CTL_OMIT_NETS (1 << 1) #define CTL_OMIT_NETS (1 << 1) ///< Omit pads net names (useless in library)
#define CTL_OMIT_TSTAMPS (1 << 2) #define CTL_OMIT_TSTAMPS (1 << 2) ///< Omit component time stamp (useless in library)
#define CTL_OMIT_INITIAL_COMMENTS (1 << 3) ///< omit MODULE initial comments #define CTL_OMIT_INITIAL_COMMENTS (1 << 3) ///< omit MODULE initial comments
#define CTL_OMIT_PATH (1 << 4) #define CTL_OMIT_PATH (1 << 4) ///< Omit component sheet time stamp (useless in library)
#define CTL_OMIT_AT (1 << 5) #define CTL_OMIT_AT (1 << 5) ///< Omit position and rotation
// (always saved with potion 0,0 and rotation = 0 in library)
// common combinations of the above: // common combinations of the above:
......
...@@ -292,8 +292,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -292,8 +292,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( ! Clear_Pcb( true ) ) if( ! Clear_Pcb( true ) )
break; break;
GetScreen()->ClearUndoRedoList();
SetCurItem( NULL );
SetCrossHairPosition( wxPoint( 0, 0 ) ); SetCrossHairPosition( wxPoint( 0, 0 ) );
MODULE* module = Create_1_Module( wxEmptyString ); MODULE* module = Create_1_Module( wxEmptyString );
...@@ -312,6 +310,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -312,6 +310,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
Zoom_Automatique( false ); Zoom_Automatique( false );
} }
GetScreen()->ClrModify();
} }
break; break;
...@@ -337,8 +337,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -337,8 +337,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
Clear_Pcb( false ); Clear_Pcb( false );
GetScreen()->ClearUndoRedoList();
SetCurItem( NULL );
SetCrossHairPosition( wxPoint( 0, 0 ) ); SetCrossHairPosition( wxPoint( 0, 0 ) );
// Add the new object to board // Add the new object to board
...@@ -357,6 +355,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -357,6 +355,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( m_Draw3DFrame ) if( m_Draw3DFrame )
m_Draw3DFrame->NewDisplay(); m_Draw3DFrame->NewDisplay();
GetScreen()->ClrModify();
} }
wizard->Destroy(); wizard->Destroy();
...@@ -463,8 +463,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -463,8 +463,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( ! Clear_Pcb( true ) ) if( ! Clear_Pcb( true ) )
break; // //this command is aborted break; // //this command is aborted
GetScreen()->ClearUndoRedoList();
SetCurItem( NULL );
SetCrossHairPosition( wxPoint( 0, 0 ) ); SetCrossHairPosition( wxPoint( 0, 0 ) );
Import_Module(); Import_Module();
redraw = true; redraw = true;
...@@ -538,6 +536,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -538,6 +536,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( m_Draw3DFrame ) if( m_Draw3DFrame )
m_Draw3DFrame->NewDisplay(); m_Draw3DFrame->NewDisplay();
GetScreen()->ClrModify();
break; break;
case ID_MODEDIT_PAD_SETTINGS: case ID_MODEDIT_PAD_SETTINGS:
......
...@@ -104,11 +104,11 @@ VRML_COLOR colors[NCOLORS] = ...@@ -104,11 +104,11 @@ VRML_COLOR colors[NCOLORS] =
{ {
{ { 0, 0.82, 0.247 }, { 0, 0, 0 }, { 0, 0.82, 0.247 }, 0.9, 0, 0.1 }, { { 0, 0.82, 0.247 }, { 0, 0, 0 }, { 0, 0.82, 0.247 }, 0.9, 0, 0.1 },
{ { 1, 0, 0 }, { 1, 0, 0 }, { 1, 0, 0 }, 0.9, 0, 0.1 }, { { 1, 0, 0 }, { 1, 0, 0 }, { 1, 0, 0 }, 0.9, 0, 0.1 },
{ { 0.659, 0, 0.463}, { 0, 0, 0}, { 0.659, 0, 0.463 }, 0.9, 0, 0.1 }, { { 0.659, 0, 0.463 }, { 0, 0, 0 }, { 0.659, 0, 0.463 }, 0.9, 0, 0.1 },
{ { 0.659, 0.294, 0 }, { 0, 0, 0 }, { 0.659, 0.294, 0 }, 0.9, 0, 0.1}, { { 0.659, 0.294, 0 }, { 0, 0, 0 }, { 0.659, 0.294, 0 }, 0.9, 0, 0.1 },
{ { 0, 0.918, 0.659 }, { 0, 0, 0 }, { 0, 0.918, 0.659 }, 0.9, 0, 0.1}, { { 0, 0.918, 0.659 }, { 0, 0, 0 }, { 0, 0.918, 0.659 }, 0.9, 0, 0.1 },
{ { 0.808, 0.733 , 0.071 }, { 0, 0, 0 }, { 0.808, 0.733 , 0.071 }, 0.9, 0, 0.1}, { { 0.808, 0.733, 0.071 }, { 0, 0, 0 }, { 0.808, 0.733 , 0.071 }, 0.9, 0, 0.1 },
{ { 0.102, 1, 0.984 }, { 0, 0, 0 }, { 0.102, 1, 0.984 }, 0.9, 0, 0.1} { { 0.102, 1, 0.984 }, { 0, 0, 0 }, { 0.102, 1, 0.984 }, 0.9, 0, 0.1 }
}; };
bool WriteHeader( IDF3_BOARD& board, std::ofstream& file ); bool WriteHeader( IDF3_BOARD& board, std::ofstream& file );
......
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