diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp index c2b40270cf..1dfd21f0f5 100644 --- a/3d-viewer/3d_canvas.cpp +++ b/3d-viewer/3d_canvas.cpp @@ -493,6 +493,7 @@ void EDA_3D_CANVAS::InitGL() glEnable( GL_ALPHA_TEST ); glEnable( GL_LINE_SMOOTH ); glEnable(GL_POLYGON_SMOOTH); + glShadeModel( GL_SMOOTH ); glEnable( GL_COLOR_MATERIAL ); glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); @@ -505,7 +506,6 @@ void EDA_3D_CANVAS::InitGL() // Initialize alpha blending function. glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - glShadeModel( GL_FLAT ); } // set viewing projection diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp index 2ac89b4188..56de1ef087 100644 --- a/eeschema/class_netlist_object.cpp +++ b/eeschema/class_netlist_object.cpp @@ -350,11 +350,11 @@ wxString NETLIST_OBJECT::GetShortNetName() const SCH_COMPONENT* link = m_netNameCandidate->GetComponentParent(); if( link ) // Should be always true { - netName = wxT("Net-<"); + netName = wxT("Net-("); netName << link->GetRef( &m_netNameCandidate->m_SheetPath ); netName << wxT("-Pad") << LIB_PIN::ReturnPinStringNum( m_netNameCandidate->m_PinNum ) - << wxT(">"); + << wxT(")"); } } else diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 6a1252de31..5ecc6ccfb2 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -940,9 +940,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event ) // Initialize fixed field values to default values found in library // Note: the field texts are not modified because they are set in schematic, // the text from libraries is most of time a dummy text - // Only VALUE and REFERENCE are re-initialized - // Perhaps the FOOTPRINT field should also be considered, - // but for most of components it is not set in library + // Only VALUE, REFERENCE , FOOTPRINT and DATASHEET are re-initialized LIB_FIELD& refField = entry->GetReferenceField(); m_Cmp->GetField( REFERENCE )->SetTextPosition( refField.GetTextPosition() + m_Cmp->m_Pos ); m_Cmp->GetField( REFERENCE )->ImportValues( refField ); @@ -951,6 +949,20 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event ) m_Cmp->GetField( VALUE )->SetTextPosition( valField.GetTextPosition() + m_Cmp->m_Pos ); m_Cmp->GetField( VALUE )->ImportValues( valField ); + LIB_FIELD* field = entry->GetField(FOOTPRINT); + if( field && m_Cmp->GetField( FOOTPRINT ) ) + { + m_Cmp->GetField( FOOTPRINT )->SetTextPosition( field->GetTextPosition() + m_Cmp->m_Pos ); + m_Cmp->GetField( FOOTPRINT )->ImportValues( *field ); + } + + field = entry->GetField(DATASHEET); + if( field && m_Cmp->GetField( DATASHEET ) ) + { + m_Cmp->GetField( DATASHEET )->SetTextPosition( field->GetTextPosition() + m_Cmp->m_Pos ); + m_Cmp->GetField( DATASHEET )->ImportValues( *field ); + } + m_Cmp->SetOrientation( CMP_NORMAL ); m_Parent->OnModify(); diff --git a/include/class_drc_item.h b/include/class_drc_item.h index 978178d185..421748322d 100644 --- a/include/class_drc_item.h +++ b/include/class_drc_item.h @@ -146,31 +146,45 @@ public: wxString ShowHtml() const { wxString ret; + wxString mainText = m_MainText; + // a wxHtmlWindows does not like < and > in the text to display + // because these chars have a special meaning in html + mainText.Replace( wxT("<"), wxT("<") ); + mainText.Replace( wxT(">"), wxT(">") ); + + wxString errText = GetErrorText(); + errText.Replace( wxT("<"), wxT("<") ); + errText.Replace( wxT(">"), wxT(">") ); + if( m_noCoordinate ) { // omit the coordinate, a NETCLASS has no location ret.Printf( _( "ErrType(%d): %s" ), m_ErrorCode, - GetChars( GetErrorText() ), - GetChars( m_MainText ) ); + GetChars( errText ), + GetChars( mainText ) ); } else if( m_hasSecondItem ) { + wxString auxText = m_AuxiliaryText; + auxText.Replace( wxT("<"), wxT("<") ); + auxText.Replace( wxT(">"), wxT(">") ); + // an html fragment for the entire message in the listbox. feel free // to add color if you want: ret.Printf( _( "ErrType(%d): %s" ), m_ErrorCode, - GetChars( GetErrorText() ), - GetChars( ShowCoord( m_MainPosition )), GetChars( m_MainText ), - GetChars( ShowCoord( m_AuxiliaryPosition )), GetChars( m_AuxiliaryText ) ); + GetChars( errText ), + GetChars( ShowCoord( m_MainPosition )), GetChars( mainText ), + GetChars( ShowCoord( m_AuxiliaryPosition )), GetChars( auxText ) ); } else { ret.Printf( _( "ErrType(%d): %s" ), m_ErrorCode, - GetChars( GetErrorText() ), - GetChars( ShowCoord( m_MainPosition ) ), GetChars( m_MainText ) ); + GetChars( errText ), + GetChars( ShowCoord( m_MainPosition ) ), GetChars( mainText ) ); } return ret;