Fix Bug #1431423 (pcbnew: edited 3d model filename is not saved).
Eechema, libedit, pin dialog editor: show pin texts in pin preview canvas.
This commit is contained in:
parent
aeddbb51ff
commit
2427b40271
|
@ -84,13 +84,13 @@ void DIALOG_LIB_EDIT_PIN::OnPaintShowPanel( wxPaintEvent& event )
|
|||
scale *= 0.9;
|
||||
dc.SetUserScale( scale, scale );
|
||||
|
||||
wxPoint offset = bBox.Centre();
|
||||
NEGATE( offset.x );
|
||||
NEGATE( offset.y );
|
||||
wxPoint offset = -bBox.Centre();
|
||||
|
||||
GRResetPenAndBrush( &dc );
|
||||
bool drawpinTexts = true; // this is a dummy param. We use its reference
|
||||
// as non null value for m_dummyPin->Draw
|
||||
m_dummyPin->Draw( NULL, &dc, offset, UNSPECIFIED_COLOR, GR_COPY,
|
||||
NULL, DefaultTransform );
|
||||
&drawpinTexts, DefaultTransform );
|
||||
|
||||
m_dummyPin->SetParent(NULL);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ MODULE::MODULE( BOARD* parent ) :
|
|||
m_CntRot90 = m_CntRot180 = 0;
|
||||
m_Surface = 0.0;
|
||||
m_Link = 0;
|
||||
m_LastEditTime = time( NULL );
|
||||
m_LastEditTime = 0;
|
||||
m_LocalClearance = 0;
|
||||
m_LocalSolderMaskMargin = 0;
|
||||
m_LocalSolderPasteMargin = 0;
|
||||
|
@ -551,8 +551,13 @@ void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
|
|||
|
||||
// Display last date the component was edited (useful in Module Editor).
|
||||
wxDateTime date( m_LastEditTime );
|
||||
|
||||
if( m_LastEditTime && date.IsValid() )
|
||||
// Date format: see http://www.cplusplus.com/reference/ctime/strftime
|
||||
msg = date.Format( wxT( "%b %d, %Y" ) ); // Abbreviated_month_name Day, Year
|
||||
msg = date.Format( wxT( "%b %d, %Y" ) ); // Abbreviated_month_name Day, Year
|
||||
else
|
||||
msg = _( "Unknown" );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Last Change" ), msg, BROWN ) );
|
||||
|
||||
// display schematic path
|
||||
|
|
|
@ -448,7 +448,18 @@ void DIALOG_MODULE_BOARD_EDITOR::Edit3DShapeFileName()
|
|||
if( dlg.ShowModal() != wxID_OK || filename.IsEmpty() )
|
||||
return; //Aborted by user
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
// In Kicad files, filenames and paths are stored using Unix notation
|
||||
// So be sure the unix notation is still used
|
||||
filename.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
#endif
|
||||
|
||||
m_3D_ShapeNameListBox->SetString( idx, filename );
|
||||
|
||||
S3D_MASTER* new3DShape = new S3D_MASTER( NULL );
|
||||
new3DShape->SetShape3DName( filename );
|
||||
delete m_Shapes3D_list[idx];
|
||||
m_Shapes3D_list[idx] = new3DShape;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -310,7 +310,18 @@ void DIALOG_MODULE_MODULE_EDITOR::Edit3DShapeFileName()
|
|||
if( dlg.ShowModal() != wxID_OK || filename.IsEmpty() )
|
||||
return; //Aborted by user
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
// In Kicad files, filenames and paths are stored using Unix notation
|
||||
// So be sure the unix notation is still used
|
||||
filename.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
#endif
|
||||
|
||||
m_3D_ShapeNameListBox->SetString( idx, filename );
|
||||
|
||||
S3D_MASTER* new3DShape = new S3D_MASTER( NULL );
|
||||
new3DShape->SetShape3DName( filename );
|
||||
delete m_shapes3D_list[idx];
|
||||
m_shapes3D_list[idx] = new3DShape;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue