Loading 3d-viewer/3d_canvas.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -639,7 +639,8 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event ) if( wxTheClipboard->Open() ) if( wxTheClipboard->Open() ) { { if( !wxTheClipboard->SetData( dobjBmp ) ) if( !wxTheClipboard->SetData( dobjBmp ) ) wxLogError( _T( "Failed to copy image to clipboard" ) ); wxMessageBox( _( "Failed to copy image to clipboard" ) ); wxTheClipboard->Flush(); /* the data in clipboard will stay wxTheClipboard->Flush(); /* the data in clipboard will stay * available after the * available after the * application exits */ * application exits */ Loading @@ -653,7 +654,7 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event ) if( !image.SaveFile( FullFileName, if( !image.SaveFile( FullFileName, fmt_is_jpeg ? wxBITMAP_TYPE_JPEG : fmt_is_jpeg ? wxBITMAP_TYPE_JPEG : wxBITMAP_TYPE_PNG ) ) wxBITMAP_TYPE_PNG ) ) wxLogError( wxT( "Can't save file" ) ); wxMessageBox( _( "Can't save file" ) ); image.Destroy(); image.Destroy(); } } Loading eeschema/edit_component_in_lib.cpp +17 −11 Original line number Original line Diff line number Diff line Loading @@ -228,7 +228,6 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& WXUNUSED * New name cannot be the root name, and must not exists * New name cannot be the root name, and must not exists */ */ { { wxString Line; wxString aliasname; wxString aliasname; LIB_COMPONENT* component = m_Parent->GetComponent(); LIB_COMPONENT* component = m_Parent->GetComponent(); CMP_LIBRARY* library = m_Parent->GetLibrary(); CMP_LIBRARY* library = m_Parent->GetLibrary(); Loading @@ -236,12 +235,15 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& WXUNUSED if( component == NULL ) if( component == NULL ) return; return; if( Get_Message( _( "New alias:" ), wxTextEntryDialog dlg( this, _( "New alias:" ), _( "Component Alias" ), aliasname ); _( "Component Alias" ), Line, this ) != 0 ) if( dlg.ShowModal() != wxID_OK ) return; return; // cancelled by user Line.Replace( wxT( " " ), wxT( "_" ) ); aliasname = dlg.GetValue( ); aliasname = Line; aliasname.Replace( wxT( " " ), wxT( "_" ) ); if( aliasname.IsEmpty() ) return; if( m_PartAliasListCtrl->FindString( aliasname ) != wxNOT_FOUND if( m_PartAliasListCtrl->FindString( aliasname ) != wxNOT_FOUND || library->FindEntry( aliasname ) != NULL ) || library->FindEntry( aliasname ) != NULL ) Loading Loading @@ -405,8 +407,8 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAllFootprintFilter( void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddFootprintFilter( wxCommandEvent& WXUNUSED (event) ) void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddFootprintFilter( wxCommandEvent& WXUNUSED (event) ) /*******************************************************************************/ /*******************************************************************************/ /* Add a new name to the alias list box /* Add a new name to the footprint filter list box * New name cannot be the root name, and must not exists * Obvioulsy, cannot be void */ */ { { wxString Line; wxString Line; Loading @@ -415,12 +417,16 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddFootprintFilter( wxCommandEvent& WXUNU if( component == NULL ) if( component == NULL ) return; return; if( Get_Message( _( "Add Footprint Filter" ), _( "Footprint Filter" ), wxTextEntryDialog dlg( this, _( "Add Footprint Filter" ), _( "Footprint Filter" ), Line ); Line, this ) != 0 ) if( dlg.ShowModal() != wxID_OK ) return; return; // cancelled by user Line = dlg.GetValue( ); Line.Replace( wxT( " " ), wxT( "_" ) ); Line.Replace( wxT( " " ), wxT( "_" ) ); if( Line.IsEmpty() ) return; /* test for an existing name: */ /* test for an existing name: */ int index = m_FootprintFilterListBox->FindString( Line ); int index = m_FootprintFilterListBox->FindString( Line ); Loading eeschema/edit_component_in_schematic.cpp +23 −6 Original line number Original line Diff line number Diff line Loading @@ -128,9 +128,15 @@ modified!\nYou must create a new power" ) ); wxString newtext = Field->m_Text; wxString newtext = Field->m_Text; DrawPanel->m_IgnoreMouseEvents = TRUE; DrawPanel->m_IgnoreMouseEvents = TRUE; Get_Message( Field->m_Name, _( "Component field text" ), newtext, this ); wxTextEntryDialog dlg( this, Field->m_Name, _( "Component field text" ), newtext ); int diag = dlg.ShowModal(); newtext = dlg.GetValue( ); DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema(); DrawPanel->m_IgnoreMouseEvents = FALSE; DrawPanel->m_IgnoreMouseEvents = FALSE; if ( diag != wxID_OK ) return; // cancelled by user Field->m_AddExtraText = flag; Field->m_AddExtraText = flag; Field->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); Field->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); Loading Loading @@ -295,7 +301,11 @@ void WinEDA_SchematicFrame::EditComponentReference( SCH_COMPONENT* Cmp, wxDC* DC flag = 1; flag = 1; wxString ref = Cmp->GetRef( GetSheet() ); wxString ref = Cmp->GetRef( GetSheet() ); Get_Message( _( "Reference" ), _( "Component reference" ), ref, this ); wxTextEntryDialog dlg( this, _( "Reference" ), _( "Component reference" ), ref ); if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user ref = dlg.GetValue( ); if( !ref.IsEmpty() ) // New text entered if( !ref.IsEmpty() ) // New text entered { { Loading Loading @@ -335,8 +345,12 @@ void WinEDA_SchematicFrame::EditComponentValue( SCH_COMPONENT* Cmp, wxDC* DC ) SCH_FIELD* TextField = Cmp->GetField( VALUE ); SCH_FIELD* TextField = Cmp->GetField( VALUE ); message = TextField->m_Text; message = TextField->m_Text; if( Get_Message( _( "Value" ), _( "Component value" ), message, this ) ) message.Empty(); //allow the user to remove the value. wxTextEntryDialog dlg( this, _( "Value" ), _( "Component value" ), message ); if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user message = dlg.GetValue( ); if( !message.IsEmpty() ) if( !message.IsEmpty() ) { { Loading Loading @@ -371,8 +385,11 @@ void WinEDA_SchematicFrame::EditComponentFootprint( SCH_COMPONENT* Cmp, wxDC* DC SCH_FIELD* TextField = Cmp->GetField( FOOTPRINT ); SCH_FIELD* TextField = Cmp->GetField( FOOTPRINT ); message = TextField->m_Text; message = TextField->m_Text; if( Get_Message( _( "Footprint" ), _( "Component footprint" ), message, this ) ) wxTextEntryDialog dlg( this, _( "Footprint" ), _( "Component footprint" ), message ); return; // edition cancelled by user. if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user message = dlg.GetValue( ); bool wasEmpty = false; bool wasEmpty = false; if( TextField->m_Text.IsEmpty() ) if( TextField->m_Text.IsEmpty() ) Loading eeschema/libedit.cpp +10 −0 Original line number Original line Diff line number Diff line Loading @@ -211,8 +211,18 @@ void WinEDA_LibeditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) DrawPanel->DrawBackGround( DC ); DrawPanel->DrawBackGround( DC ); if( m_component ) if( m_component ) { // display reference like in schematic (a reference U is shown U? or U?A) // although it is stored without ? and part id. // So temporary change the reference by a schematic like reference LIB_FIELD* Field = m_component->GetField( REFERENCE ); wxString fieldText = Field->m_Text; wxString fieldfullText = Field->GetFullText( m_unit ); Field->m_Text = fieldfullText; m_component->Draw( DrawPanel, DC, wxPoint( 0, 0 ), m_unit, m_component->Draw( DrawPanel, DC, wxPoint( 0, 0 ), m_unit, m_convert, GR_DEFAULT_DRAWMODE ); m_convert, GR_DEFAULT_DRAWMODE ); Field->m_Text = fieldText; } GetScreen()->ClrRefreshReq(); GetScreen()->ClrRefreshReq(); Loading eeschema/libfield.cpp +46 −26 Original line number Original line Diff line number Diff line Loading @@ -134,6 +134,7 @@ void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field ) { { wxString Text; wxString Text; wxString title; wxString title; bool save = true; if( Field == NULL ) if( Field == NULL ) return; return; Loading @@ -141,11 +142,11 @@ void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field ) switch( Field->m_FieldId ) switch( Field->m_FieldId ) { { case REFERENCE: case REFERENCE: title = wxT( "Reference:" ); title = _( "Reference:" ); break; break; case VALUE: case VALUE: title = wxT( "Component Name / Value:" ); title = _( "Component Name / Value:" ); break; break; default: default: Loading @@ -154,10 +155,25 @@ void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field ) Text = Field->m_Text; Text = Field->m_Text; /* FIXME: Use wxTextEntry dialog here and check for cancel button. */ { Get_Message( title, _( "Edit field" ), Text, this ); wxTextEntryDialog dlg( this, title, _( "Edit field" ), Text ); if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user Text = dlg.GetValue( ); } Text.Replace( wxT( " " ), wxT( "_" ) ); Text.Replace( wxT( " " ), wxT( "_" ) ); if( Field->m_FieldId == REFERENCE || Field->m_FieldId == VALUE ) { if( Text.IsEmpty ( ) ) { DisplayError( this, _( "Value or Reference cannot be void. Aborted" ) ); return; } } wxString fieldText = Field->GetFullText( m_unit ); wxString fieldText = Field->GetFullText( m_unit ); /* If the value field is changed, this is equivalent to creating a new /* If the value field is changed, this is equivalent to creating a new Loading @@ -172,7 +188,8 @@ void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field ) /* Test for an existing name in the current components alias list. */ /* Test for an existing name in the current components alias list. */ if( Field->GetParent()->m_AliasList.Index( Text, false ) != wxNOT_FOUND ) if( Field->GetParent()->m_AliasList.Index( Text, false ) != wxNOT_FOUND ) { { msg.Printf( _( "The field name <%s> is an existing alias of the \ msg.Printf( _( "The field name <%s> is an existing alias of the \ component <%s>.\nPlease choose another name that does not conflict with any \ component <%s>.\nPlease choose another name that does not conflict with any \ names in the alias list." ), names in the alias list." ), GetChars( Text ), GetChars( Text ), Loading @@ -186,7 +203,8 @@ names in the alias list." ), */ */ if( m_library && m_library->FindEntry( Text ) != NULL ) if( m_library && m_library->FindEntry( Text ) != NULL ) { { msg.Printf( _( "The field name <%s> conflicts with an existing \ msg.Printf( _( "The field name <%s> conflicts with an existing \ entry in the component library <%s>.\nPlease choose another name that does \ entry in the component library <%s>.\nPlease choose another name that does \ not conflict with any library entries." ), not conflict with any library entries." ), GetChars( Text ), GetChars( Text ), Loading @@ -195,6 +213,8 @@ not conflict with any library entries." ), return; return; } } SaveCopyInUndoList( Field->GetParent() ); save = false; Field->GetParent()->SetName( Text ); Field->GetParent()->SetName( Text ); } } Loading @@ -203,6 +223,7 @@ not conflict with any library entries." ), if( !Text.IsEmpty() ) if( !Text.IsEmpty() ) { { if( save ) SaveCopyInUndoList( Field->GetParent() ); SaveCopyInUndoList( Field->GetParent() ); Field->m_Text = Text; Field->m_Text = Text; } } Loading Loading @@ -233,7 +254,6 @@ not conflict with any library entries." ), */ */ void WinEDA_LibeditFrame::RotateField( wxDC* DC, LIB_FIELD* Field ) void WinEDA_LibeditFrame::RotateField( wxDC* DC, LIB_FIELD* Field ) { { if( Field == NULL ) if( Field == NULL ) return; return; Loading Loading
3d-viewer/3d_canvas.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -639,7 +639,8 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event ) if( wxTheClipboard->Open() ) if( wxTheClipboard->Open() ) { { if( !wxTheClipboard->SetData( dobjBmp ) ) if( !wxTheClipboard->SetData( dobjBmp ) ) wxLogError( _T( "Failed to copy image to clipboard" ) ); wxMessageBox( _( "Failed to copy image to clipboard" ) ); wxTheClipboard->Flush(); /* the data in clipboard will stay wxTheClipboard->Flush(); /* the data in clipboard will stay * available after the * available after the * application exits */ * application exits */ Loading @@ -653,7 +654,7 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event ) if( !image.SaveFile( FullFileName, if( !image.SaveFile( FullFileName, fmt_is_jpeg ? wxBITMAP_TYPE_JPEG : fmt_is_jpeg ? wxBITMAP_TYPE_JPEG : wxBITMAP_TYPE_PNG ) ) wxBITMAP_TYPE_PNG ) ) wxLogError( wxT( "Can't save file" ) ); wxMessageBox( _( "Can't save file" ) ); image.Destroy(); image.Destroy(); } } Loading
eeschema/edit_component_in_lib.cpp +17 −11 Original line number Original line Diff line number Diff line Loading @@ -228,7 +228,6 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& WXUNUSED * New name cannot be the root name, and must not exists * New name cannot be the root name, and must not exists */ */ { { wxString Line; wxString aliasname; wxString aliasname; LIB_COMPONENT* component = m_Parent->GetComponent(); LIB_COMPONENT* component = m_Parent->GetComponent(); CMP_LIBRARY* library = m_Parent->GetLibrary(); CMP_LIBRARY* library = m_Parent->GetLibrary(); Loading @@ -236,12 +235,15 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& WXUNUSED if( component == NULL ) if( component == NULL ) return; return; if( Get_Message( _( "New alias:" ), wxTextEntryDialog dlg( this, _( "New alias:" ), _( "Component Alias" ), aliasname ); _( "Component Alias" ), Line, this ) != 0 ) if( dlg.ShowModal() != wxID_OK ) return; return; // cancelled by user Line.Replace( wxT( " " ), wxT( "_" ) ); aliasname = dlg.GetValue( ); aliasname = Line; aliasname.Replace( wxT( " " ), wxT( "_" ) ); if( aliasname.IsEmpty() ) return; if( m_PartAliasListCtrl->FindString( aliasname ) != wxNOT_FOUND if( m_PartAliasListCtrl->FindString( aliasname ) != wxNOT_FOUND || library->FindEntry( aliasname ) != NULL ) || library->FindEntry( aliasname ) != NULL ) Loading Loading @@ -405,8 +407,8 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAllFootprintFilter( void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddFootprintFilter( wxCommandEvent& WXUNUSED (event) ) void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddFootprintFilter( wxCommandEvent& WXUNUSED (event) ) /*******************************************************************************/ /*******************************************************************************/ /* Add a new name to the alias list box /* Add a new name to the footprint filter list box * New name cannot be the root name, and must not exists * Obvioulsy, cannot be void */ */ { { wxString Line; wxString Line; Loading @@ -415,12 +417,16 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddFootprintFilter( wxCommandEvent& WXUNU if( component == NULL ) if( component == NULL ) return; return; if( Get_Message( _( "Add Footprint Filter" ), _( "Footprint Filter" ), wxTextEntryDialog dlg( this, _( "Add Footprint Filter" ), _( "Footprint Filter" ), Line ); Line, this ) != 0 ) if( dlg.ShowModal() != wxID_OK ) return; return; // cancelled by user Line = dlg.GetValue( ); Line.Replace( wxT( " " ), wxT( "_" ) ); Line.Replace( wxT( " " ), wxT( "_" ) ); if( Line.IsEmpty() ) return; /* test for an existing name: */ /* test for an existing name: */ int index = m_FootprintFilterListBox->FindString( Line ); int index = m_FootprintFilterListBox->FindString( Line ); Loading
eeschema/edit_component_in_schematic.cpp +23 −6 Original line number Original line Diff line number Diff line Loading @@ -128,9 +128,15 @@ modified!\nYou must create a new power" ) ); wxString newtext = Field->m_Text; wxString newtext = Field->m_Text; DrawPanel->m_IgnoreMouseEvents = TRUE; DrawPanel->m_IgnoreMouseEvents = TRUE; Get_Message( Field->m_Name, _( "Component field text" ), newtext, this ); wxTextEntryDialog dlg( this, Field->m_Name, _( "Component field text" ), newtext ); int diag = dlg.ShowModal(); newtext = dlg.GetValue( ); DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema(); DrawPanel->m_IgnoreMouseEvents = FALSE; DrawPanel->m_IgnoreMouseEvents = FALSE; if ( diag != wxID_OK ) return; // cancelled by user Field->m_AddExtraText = flag; Field->m_AddExtraText = flag; Field->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); Field->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); Loading Loading @@ -295,7 +301,11 @@ void WinEDA_SchematicFrame::EditComponentReference( SCH_COMPONENT* Cmp, wxDC* DC flag = 1; flag = 1; wxString ref = Cmp->GetRef( GetSheet() ); wxString ref = Cmp->GetRef( GetSheet() ); Get_Message( _( "Reference" ), _( "Component reference" ), ref, this ); wxTextEntryDialog dlg( this, _( "Reference" ), _( "Component reference" ), ref ); if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user ref = dlg.GetValue( ); if( !ref.IsEmpty() ) // New text entered if( !ref.IsEmpty() ) // New text entered { { Loading Loading @@ -335,8 +345,12 @@ void WinEDA_SchematicFrame::EditComponentValue( SCH_COMPONENT* Cmp, wxDC* DC ) SCH_FIELD* TextField = Cmp->GetField( VALUE ); SCH_FIELD* TextField = Cmp->GetField( VALUE ); message = TextField->m_Text; message = TextField->m_Text; if( Get_Message( _( "Value" ), _( "Component value" ), message, this ) ) message.Empty(); //allow the user to remove the value. wxTextEntryDialog dlg( this, _( "Value" ), _( "Component value" ), message ); if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user message = dlg.GetValue( ); if( !message.IsEmpty() ) if( !message.IsEmpty() ) { { Loading Loading @@ -371,8 +385,11 @@ void WinEDA_SchematicFrame::EditComponentFootprint( SCH_COMPONENT* Cmp, wxDC* DC SCH_FIELD* TextField = Cmp->GetField( FOOTPRINT ); SCH_FIELD* TextField = Cmp->GetField( FOOTPRINT ); message = TextField->m_Text; message = TextField->m_Text; if( Get_Message( _( "Footprint" ), _( "Component footprint" ), message, this ) ) wxTextEntryDialog dlg( this, _( "Footprint" ), _( "Component footprint" ), message ); return; // edition cancelled by user. if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user message = dlg.GetValue( ); bool wasEmpty = false; bool wasEmpty = false; if( TextField->m_Text.IsEmpty() ) if( TextField->m_Text.IsEmpty() ) Loading
eeschema/libedit.cpp +10 −0 Original line number Original line Diff line number Diff line Loading @@ -211,8 +211,18 @@ void WinEDA_LibeditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) DrawPanel->DrawBackGround( DC ); DrawPanel->DrawBackGround( DC ); if( m_component ) if( m_component ) { // display reference like in schematic (a reference U is shown U? or U?A) // although it is stored without ? and part id. // So temporary change the reference by a schematic like reference LIB_FIELD* Field = m_component->GetField( REFERENCE ); wxString fieldText = Field->m_Text; wxString fieldfullText = Field->GetFullText( m_unit ); Field->m_Text = fieldfullText; m_component->Draw( DrawPanel, DC, wxPoint( 0, 0 ), m_unit, m_component->Draw( DrawPanel, DC, wxPoint( 0, 0 ), m_unit, m_convert, GR_DEFAULT_DRAWMODE ); m_convert, GR_DEFAULT_DRAWMODE ); Field->m_Text = fieldText; } GetScreen()->ClrRefreshReq(); GetScreen()->ClrRefreshReq(); Loading
eeschema/libfield.cpp +46 −26 Original line number Original line Diff line number Diff line Loading @@ -134,6 +134,7 @@ void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field ) { { wxString Text; wxString Text; wxString title; wxString title; bool save = true; if( Field == NULL ) if( Field == NULL ) return; return; Loading @@ -141,11 +142,11 @@ void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field ) switch( Field->m_FieldId ) switch( Field->m_FieldId ) { { case REFERENCE: case REFERENCE: title = wxT( "Reference:" ); title = _( "Reference:" ); break; break; case VALUE: case VALUE: title = wxT( "Component Name / Value:" ); title = _( "Component Name / Value:" ); break; break; default: default: Loading @@ -154,10 +155,25 @@ void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field ) Text = Field->m_Text; Text = Field->m_Text; /* FIXME: Use wxTextEntry dialog here and check for cancel button. */ { Get_Message( title, _( "Edit field" ), Text, this ); wxTextEntryDialog dlg( this, title, _( "Edit field" ), Text ); if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user Text = dlg.GetValue( ); } Text.Replace( wxT( " " ), wxT( "_" ) ); Text.Replace( wxT( " " ), wxT( "_" ) ); if( Field->m_FieldId == REFERENCE || Field->m_FieldId == VALUE ) { if( Text.IsEmpty ( ) ) { DisplayError( this, _( "Value or Reference cannot be void. Aborted" ) ); return; } } wxString fieldText = Field->GetFullText( m_unit ); wxString fieldText = Field->GetFullText( m_unit ); /* If the value field is changed, this is equivalent to creating a new /* If the value field is changed, this is equivalent to creating a new Loading @@ -172,7 +188,8 @@ void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field ) /* Test for an existing name in the current components alias list. */ /* Test for an existing name in the current components alias list. */ if( Field->GetParent()->m_AliasList.Index( Text, false ) != wxNOT_FOUND ) if( Field->GetParent()->m_AliasList.Index( Text, false ) != wxNOT_FOUND ) { { msg.Printf( _( "The field name <%s> is an existing alias of the \ msg.Printf( _( "The field name <%s> is an existing alias of the \ component <%s>.\nPlease choose another name that does not conflict with any \ component <%s>.\nPlease choose another name that does not conflict with any \ names in the alias list." ), names in the alias list." ), GetChars( Text ), GetChars( Text ), Loading @@ -186,7 +203,8 @@ names in the alias list." ), */ */ if( m_library && m_library->FindEntry( Text ) != NULL ) if( m_library && m_library->FindEntry( Text ) != NULL ) { { msg.Printf( _( "The field name <%s> conflicts with an existing \ msg.Printf( _( "The field name <%s> conflicts with an existing \ entry in the component library <%s>.\nPlease choose another name that does \ entry in the component library <%s>.\nPlease choose another name that does \ not conflict with any library entries." ), not conflict with any library entries." ), GetChars( Text ), GetChars( Text ), Loading @@ -195,6 +213,8 @@ not conflict with any library entries." ), return; return; } } SaveCopyInUndoList( Field->GetParent() ); save = false; Field->GetParent()->SetName( Text ); Field->GetParent()->SetName( Text ); } } Loading @@ -203,6 +223,7 @@ not conflict with any library entries." ), if( !Text.IsEmpty() ) if( !Text.IsEmpty() ) { { if( save ) SaveCopyInUndoList( Field->GetParent() ); SaveCopyInUndoList( Field->GetParent() ); Field->m_Text = Text; Field->m_Text = Text; } } Loading Loading @@ -233,7 +254,6 @@ not conflict with any library entries." ), */ */ void WinEDA_LibeditFrame::RotateField( wxDC* DC, LIB_FIELD* Field ) void WinEDA_LibeditFrame::RotateField( wxDC* DC, LIB_FIELD* Field ) { { if( Field == NULL ) if( Field == NULL ) return; return; Loading