From 41f2b5ec8dc3d400b4a2418466e58796ad26a4e8 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 22 Feb 2012 15:04:48 +0100 Subject: [PATCH] Eeschema: Add better dialog to edit an existing field of the current edited component. --- eeschema/CMakeLists.txt | 2 +- eeschema/dialogs/dialog_edit_one_field.cpp | 252 ++++++++++++++++++ eeschema/dialogs/dialog_edit_one_field.h | 130 +++++++++ .../dialogs/dialog_lib_edit_one_field.cpp | 208 --------------- eeschema/dialogs/dialog_lib_edit_one_field.h | 32 --- eeschema/edit_component_in_schematic.cpp | 47 ++-- eeschema/libfield.cpp | 2 +- 7 files changed, 410 insertions(+), 263 deletions(-) create mode 100644 eeschema/dialogs/dialog_edit_one_field.cpp create mode 100644 eeschema/dialogs/dialog_edit_one_field.h delete mode 100644 eeschema/dialogs/dialog_lib_edit_one_field.cpp delete mode 100644 eeschema/dialogs/dialog_lib_edit_one_field.h diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index d8280119a5..7419c2da6c 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -50,7 +50,7 @@ set(EESCHEMA_SRCS dialogs/dialog_edit_label_base.cpp dialogs/dialog_edit_libentry_fields_in_lib.cpp dialogs/dialog_edit_libentry_fields_in_lib_base.cpp - dialogs/dialog_lib_edit_one_field.cpp + dialogs/dialog_edit_one_field.cpp dialogs/dialog_eeschema_config.cpp dialogs/dialog_eeschema_config_fbp.cpp dialogs/dialog_eeschema_options_base.cpp diff --git a/eeschema/dialogs/dialog_edit_one_field.cpp b/eeschema/dialogs/dialog_edit_one_field.cpp new file mode 100644 index 0000000000..b4098c49aa --- /dev/null +++ b/eeschema/dialogs/dialog_edit_one_field.cpp @@ -0,0 +1,252 @@ +/** + * @file dialog_lib_edit_one_field.cpp + * @brief dialog to editing a field ( not a graphic text) in current component. + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +void DIALOG_EDIT_ONE_FIELD::initDlg_base( ) +{ + wxString msg; + + m_TextValue->SetFocus(); + + // Disable options for graphic text edition, not existing in fields + m_CommonConvert->Show(false); + m_CommonUnit->Show(false); + + msg = ReturnStringFromValue( g_UserUnit, m_textsize, + m_parent->GetInternalUnits() ); + m_TextSize->SetValue( msg ); + + if( m_textorient == TEXT_ORIENT_VERT ) + m_Orient->SetValue( true ); + + m_Invisible->SetValue( m_text_invisible ); + m_TextShapeOpt->SetSelection( m_textshape ); + + switch ( m_textHjustify ) + { + case GR_TEXT_HJUSTIFY_LEFT: + m_TextHJustificationOpt->SetSelection( 0 ); + break; + + case GR_TEXT_HJUSTIFY_CENTER: + m_TextHJustificationOpt->SetSelection( 1 ); + break; + + case GR_TEXT_HJUSTIFY_RIGHT: + m_TextHJustificationOpt->SetSelection( 2 ); + break; + + } + + switch ( m_textVjustify ) + { + case GR_TEXT_VJUSTIFY_BOTTOM: + m_TextVJustificationOpt->SetSelection( 0 ); + break; + + case GR_TEXT_VJUSTIFY_CENTER: + m_TextVJustificationOpt->SetSelection( 1 ); + break; + + case GR_TEXT_VJUSTIFY_TOP: + m_TextVJustificationOpt->SetSelection( 2 ); + break; + } + + msg = m_TextSizeText->GetLabel() + ReturnUnitSymbol(); + m_TextSizeText->SetLabel( msg ); + + m_sdbSizerButtonsOK->SetDefault(); +} + + +void DIALOG_LIB_EDIT_ONE_FIELD::initDlg( ) +{ + m_textsize = m_field->m_Size.x; + m_TextValue->SetValue( m_field->m_Text ); + + m_textorient = m_field->GetOrientation(); + + m_text_invisible = m_field->IsVisible() ? false : true; + + m_textshape = 0; + if( m_field->m_Italic ) + m_textshape = 1; + if( m_field->m_Bold ) + m_textshape |= 2; + + m_textHjustify = m_field->m_HJustify; + m_textVjustify = m_field->m_VJustify; + + initDlg_base( ); +} + +wxString DIALOG_LIB_EDIT_ONE_FIELD::GetTextField() +{ + wxString line = m_TextValue->GetValue(); + // Spaces are not allowed in fields, so replace them by '_' + line.Replace( wxT( " " ), wxT( "_" ) ); + return line; +}; + +void DIALOG_EDIT_ONE_FIELD::TransfertDataToField() +{ + m_textorient = m_Orient->GetValue() ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ; + wxString msg = m_TextSize->GetValue(); + m_textsize = ReturnValueFromString( g_UserUnit, msg, m_parent->GetInternalUnits() ); + + switch( m_TextHJustificationOpt->GetSelection() ) + { + case 0: + m_textHjustify = GR_TEXT_HJUSTIFY_LEFT; + break; + + case 1: + m_textHjustify = GR_TEXT_HJUSTIFY_CENTER; + break; + + case 2: + m_textHjustify = GR_TEXT_HJUSTIFY_RIGHT; + break; + } + + switch( m_TextVJustificationOpt->GetSelection() ) + { + case 0: + m_textVjustify = GR_TEXT_VJUSTIFY_BOTTOM; + break; + + case 1: + m_textVjustify = GR_TEXT_VJUSTIFY_CENTER; + break; + + case 2: + m_textVjustify = GR_TEXT_VJUSTIFY_TOP; + break; + } +} + +void DIALOG_LIB_EDIT_ONE_FIELD::TransfertDataToField() +{ + DIALOG_EDIT_ONE_FIELD::TransfertDataToField(); + + m_field->SetText( GetTextField() ); + + m_field->m_Size.x = m_field->m_Size.y = m_textsize; + m_field->m_Orient = m_textorient; + + if( m_Invisible->GetValue() ) + m_field->m_Attributs |= TEXT_NO_VISIBLE; + else + m_field->m_Attributs &= ~TEXT_NO_VISIBLE; + + if( ( m_TextShapeOpt->GetSelection() & 1 ) != 0 ) + m_field->m_Italic = true; + else + m_field->m_Italic = false; + + if( ( m_TextShapeOpt->GetSelection() & 2 ) != 0 ) + m_field->m_Bold = true; + else + m_field->m_Bold = false; + + m_field->m_HJustify = m_textHjustify; + m_field->m_VJustify = m_textVjustify; +} + + +void DIALOG_SCH_EDIT_ONE_FIELD::initDlg( ) +{ + m_textsize = m_field->m_Size.x; + m_TextValue->SetValue( m_field->m_Text ); + m_textorient = m_field->GetOrientation(); + m_text_invisible = m_field->IsVisible() ? false : true; + + m_textshape = 0; + if( m_field->m_Italic ) + m_textshape = 1; + if( m_field->m_Bold ) + m_textshape |= 2; + + m_textHjustify = m_field->m_HJustify; + m_textVjustify = m_field->m_VJustify; + + initDlg_base( ); +} + + +wxString DIALOG_SCH_EDIT_ONE_FIELD::GetTextField() +{ + wxString line = m_TextValue->GetValue(); + line.Trim( true ); + line.Trim( false ); + return line; +}; + +void DIALOG_SCH_EDIT_ONE_FIELD::TransfertDataToField() +{ + DIALOG_EDIT_ONE_FIELD::TransfertDataToField(); + + m_field->SetText( GetTextField() ); + + m_field->m_Size.x = m_field->m_Size.y = m_textsize; + m_field->m_Orient = m_textorient; + + if( m_Invisible->GetValue() ) + m_field->m_Attributs |= TEXT_NO_VISIBLE; + else + m_field->m_Attributs &= ~TEXT_NO_VISIBLE; + + if( ( m_TextShapeOpt->GetSelection() & 1 ) != 0 ) + m_field->m_Italic = true; + else + m_field->m_Italic = false; + + if( ( m_TextShapeOpt->GetSelection() & 2 ) != 0 ) + m_field->m_Bold = true; + else + m_field->m_Bold = false; + + m_field->m_HJustify = m_textHjustify; + m_field->m_VJustify = m_textVjustify; +} diff --git a/eeschema/dialogs/dialog_edit_one_field.h b/eeschema/dialogs/dialog_edit_one_field.h new file mode 100644 index 0000000000..fe2949d52c --- /dev/null +++ b/eeschema/dialogs/dialog_edit_one_field.h @@ -0,0 +1,130 @@ + +#ifndef _DIALOG_EDIT_ONE_FIELD_H_ +#define _DIALOG_EDIT_ONE_FIELD_H_ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + + +class SCH_BASE_FRAME; +class LIB_FIELD; +class SCH_FIELD; + +// Basic class to edit a field: a schematic or a lib component field +class DIALOG_EDIT_ONE_FIELD : public DIALOG_LIB_EDIT_TEXT_BASE +{ +protected: + SCH_BASE_FRAME* m_parent; + int m_textshape; + int m_textsize; + int m_textorient; + EDA_TEXT_HJUSTIFY_T m_textHjustify; + EDA_TEXT_VJUSTIFY_T m_textVjustify; + bool m_text_invisible; + +public: + DIALOG_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent, const wxString& aTitle ): + DIALOG_LIB_EDIT_TEXT_BASE( aParent ) + { + m_parent = aParent; + SetTitle( aTitle ); + } + + ~DIALOG_EDIT_ONE_FIELD() {}; + virtual void TransfertDataToField(); + + void SetTextField( const wxString& aText ) + { + m_TextValue->SetValue( aText ); + } + +protected: + void initDlg_base( ); + void OnOkClick( wxCommandEvent& aEvent ) + { + EndModal(wxID_OK); + } + + void OnCancelClick( wxCommandEvent& aEvent ) + { + EndModal(wxID_CANCEL); + } +}; + + +// Class to edit a lib component field +class DIALOG_LIB_EDIT_ONE_FIELD : public DIALOG_EDIT_ONE_FIELD +{ +private: + LIB_FIELD* m_field; + +public: + DIALOG_LIB_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent, const wxString& aTitle, + LIB_FIELD* aField ): + DIALOG_EDIT_ONE_FIELD( aParent, aTitle ) + { + m_field = aField; + initDlg(); + GetSizer()->SetSizeHints(this); + Centre(); + } + + ~DIALOG_LIB_EDIT_ONE_FIELD() {}; + + void TransfertDataToField(); + wxString GetTextField(); + +private: + void initDlg( ); +}; + +// Class to edit a schematic component field +class DIALOG_SCH_EDIT_ONE_FIELD : public DIALOG_EDIT_ONE_FIELD +{ +private: + SCH_FIELD* m_field; + +public: + DIALOG_SCH_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent, + const wxString& aTitle, SCH_FIELD* aField ): + DIALOG_EDIT_ONE_FIELD( aParent, aTitle ) + { + m_field = aField; + initDlg(); + GetSizer()->SetSizeHints(this); + Centre(); + } + ~DIALOG_SCH_EDIT_ONE_FIELD() {}; + + void TransfertDataToField(); + wxString GetTextField(); + +private: + void initDlg( ); +}; + + +#endif // _DIALOG_EDIT_ONE_FIELD_H_ diff --git a/eeschema/dialogs/dialog_lib_edit_one_field.cpp b/eeschema/dialogs/dialog_lib_edit_one_field.cpp deleted file mode 100644 index 212bc75315..0000000000 --- a/eeschema/dialogs/dialog_lib_edit_one_field.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/** - * @file dialog_lib_edit_one_field.cpp - * @brief dialog to editing fields ( not graphic texts) in components. - */ - -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - - -DIALOG_LIB_EDIT_ONE_FIELD::DIALOG_LIB_EDIT_ONE_FIELD( LIB_EDIT_FRAME* aParent, - const wxString& aTitle, - LIB_FIELD* aField ) : - DIALOG_LIB_EDIT_TEXT_BASE( aParent ) -{ - m_parent = aParent; - m_field = aField; - SetTitle( aTitle ); - initDlg(); - - GetSizer()->SetSizeHints(this); - Centre(); -} - - -void DIALOG_LIB_EDIT_ONE_FIELD::initDlg( ) -{ - wxString msg; - - m_TextValue->SetFocus(); - - // Disable options for graphic text edition, not existing in fields - m_CommonConvert->Show(false); - m_CommonUnit->Show(false); - - if ( m_field ) - { - msg = ReturnStringFromValue( g_UserUnit, m_field->m_Size.x, - m_parent->GetInternalUnits() ); - m_TextSize->SetValue( msg ); - m_TextValue->SetValue( m_field->m_Text ); - - if( m_field->GetOrientation() == TEXT_ORIENT_VERT ) - m_Orient->SetValue( true ); - - if( m_field->GetOrientation() == TEXT_ORIENT_VERT ) - m_Orient->SetValue( true ); - - m_Invisible->SetValue( m_field->IsVisible() ? false : true); - - int shape = 0; - if( m_field->m_Italic ) - shape = 1; - if( m_field->m_Bold ) - shape |= 2; - - m_TextShapeOpt->SetSelection( shape ); - - switch ( m_field->m_HJustify ) - { - case GR_TEXT_HJUSTIFY_LEFT: - m_TextHJustificationOpt->SetSelection( 0 ); - break; - - case GR_TEXT_HJUSTIFY_CENTER: - m_TextHJustificationOpt->SetSelection( 1 ); - break; - - case GR_TEXT_HJUSTIFY_RIGHT: - m_TextHJustificationOpt->SetSelection( 2 ); - break; - - } - - switch ( m_field->m_VJustify ) - { - case GR_TEXT_VJUSTIFY_BOTTOM: - m_TextVJustificationOpt->SetSelection( 0 ); - break; - - case GR_TEXT_VJUSTIFY_CENTER: - m_TextVJustificationOpt->SetSelection( 1 ); - break; - - case GR_TEXT_VJUSTIFY_TOP: - m_TextVJustificationOpt->SetSelection( 2 ); - break; - } - } - - msg = m_TextSizeText->GetLabel() + ReturnUnitSymbol(); - m_TextSizeText->SetLabel( msg ); - - m_sdbSizerButtonsOK->SetDefault(); -} - - -void DIALOG_LIB_EDIT_ONE_FIELD::OnCancelClick( wxCommandEvent& event ) -{ - EndModal(wxID_CANCEL); -} - - -/* Updates the different parameters for the component being edited */ -void DIALOG_LIB_EDIT_ONE_FIELD::OnOkClick( wxCommandEvent& event ) -{ - EndModal(wxID_OK); -} - -wxString DIALOG_LIB_EDIT_ONE_FIELD::GetTextField() -{ - wxString line = m_TextValue->GetValue(); - line.Replace( wxT( " " ), wxT( "_" ) ); - return line; -}; - -void DIALOG_LIB_EDIT_ONE_FIELD::TransfertDataToField() -{ - - int orientation = m_Orient->GetValue() ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ; - wxString msg = m_TextSize->GetValue(); - int textSize = ReturnValueFromString( g_UserUnit, msg, m_parent->GetInternalUnits() ); - - if( m_field ) - { - m_field->SetText( GetTextField() ); - - m_field->m_Size.x = m_field->m_Size.y = textSize; - m_field->m_Orient = orientation; - - if( m_Invisible->GetValue() ) - m_field->m_Attributs |= TEXT_NO_VISIBLE; - else - m_field->m_Attributs &= ~TEXT_NO_VISIBLE; - - if( ( m_TextShapeOpt->GetSelection() & 1 ) != 0 ) - m_field->m_Italic = true; - else - m_field->m_Italic = false; - - if( ( m_TextShapeOpt->GetSelection() & 2 ) != 0 ) - m_field->m_Bold = true; - else - m_field->m_Bold = false; - - switch( m_TextHJustificationOpt->GetSelection() ) - { - case 0: - m_field->m_HJustify = GR_TEXT_HJUSTIFY_LEFT; - break; - - case 1: - m_field->m_HJustify = GR_TEXT_HJUSTIFY_CENTER; - break; - - case 2: - m_field->m_HJustify = GR_TEXT_HJUSTIFY_RIGHT; - break; - } - - switch( m_TextVJustificationOpt->GetSelection() ) - { - case 0: - m_field->m_VJustify = GR_TEXT_VJUSTIFY_BOTTOM; - break; - - case 1: - m_field->m_VJustify = GR_TEXT_VJUSTIFY_CENTER; - break; - - case 2: - m_field->m_VJustify = GR_TEXT_VJUSTIFY_TOP; - break; - } - } -} diff --git a/eeschema/dialogs/dialog_lib_edit_one_field.h b/eeschema/dialogs/dialog_lib_edit_one_field.h deleted file mode 100644 index 2d68a408a5..0000000000 --- a/eeschema/dialogs/dialog_lib_edit_one_field.h +++ /dev/null @@ -1,32 +0,0 @@ - -#ifndef _DIALOG_LIB_EDIT_ONE_FIELD_H_ -#define _DIALOG_LIB_EDIT_ONE_FIELD_H_ - - -#include - - -class LIB_EDIT_FRAME; -class LIB_FIELD; - - -class DIALOG_LIB_EDIT_ONE_FIELD : public DIALOG_LIB_EDIT_TEXT_BASE -{ -private: - LIB_EDIT_FRAME* m_parent; - LIB_FIELD* m_field; - -public: - DIALOG_LIB_EDIT_ONE_FIELD( LIB_EDIT_FRAME* aParent, const wxString& aTitle, LIB_FIELD* aField ); - ~DIALOG_LIB_EDIT_ONE_FIELD() {}; - void TransfertDataToField(); - wxString GetTextField(); - -private: - void initDlg( ); - void OnOkClick( wxCommandEvent& aEvent ); - void OnCancelClick( wxCommandEvent& aEvent ); -}; - - -#endif // _DIALOG_LIB_EDIT_ONE_FIELD_H_ diff --git a/eeschema/edit_component_in_schematic.cpp b/eeschema/edit_component_in_schematic.cpp index 10c88a52a4..c940fd2826 100644 --- a/eeschema/edit_component_in_schematic.cpp +++ b/eeschema/edit_component_in_schematic.cpp @@ -39,6 +39,8 @@ #include #include +#include + void SCH_EDIT_FRAME::EditComponentFieldText( SCH_FIELD* aField, wxDC* aDC ) { @@ -79,65 +81,68 @@ create a new power component with the new value." ), GetChars( entry->GetName() wxString title; title.Printf( _( "Edit %s Field" ), GetChars( aField->GetName() ) ); - wxTextEntryDialog dlg( this, wxEmptyString , title, newtext ); +// wxTextEntryDialog dlg( this, wxEmptyString , title, newtext ); + if( aField->GetText().IsEmpty() ) // Means the field was not already in use + { + aField->m_Pos = component->GetPosition(); + aField->m_Size.x = aField->m_Size.y = m_TextFieldSize; + } + DIALOG_SCH_EDIT_ONE_FIELD dlg( this, title, aField ); + int response = dlg.ShowModal(); m_canvas->MoveCursorToCrossHair(); m_canvas->SetIgnoreMouseEvents( false ); - newtext = dlg.GetValue( ); - newtext.Trim( true ); - newtext.Trim( false ); + newtext = dlg.GetTextField( ); - if ( response != wxID_OK || newtext == aField->GetText() ) + if ( response != wxID_OK ) return; // canceled by user - aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode ); - + // make some tests + bool can_update = true; if( !newtext.IsEmpty() ) { - if( aField->GetText().IsEmpty() ) // Means the field was not already in use - { - aField->m_Pos = component->GetPosition(); - aField->m_Size.x = aField->m_Size.y = m_TextFieldSize; - } - if( fieldNdx == REFERENCE ) { // Test is reference is acceptable: if( SCH_COMPONENT::IsReferenceStringValid( newtext ) ) { component->SetRef( m_CurrentSheet, newtext ); - aField->SetText( newtext ); } else { DisplayError( this, _( "Illegal reference string! No change" ) ); + can_update = false; } } - else - { - aField->m_Text = newtext; - } } else { if( fieldNdx == REFERENCE ) { DisplayError( this, _( "The reference field cannot be empty! No change" ) ); + can_update = false; } else if( fieldNdx == VALUE ) { DisplayError( this, _( "The value field cannot be empty! No change" ) ); + can_update = false; } else { - aField->m_Text = wxT( "~" ); + dlg.SetTextField( wxT( "~" ) ); } } - aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode ); + if( can_update ) + { + aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode ); + dlg.TransfertDataToField(); + aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode ); + OnModify(); + } + component->DisplayInfo( this ); - OnModify(); } diff --git a/eeschema/libfield.cpp b/eeschema/libfield.cpp index dc50df4935..a2c6f35323 100644 --- a/eeschema/libfield.cpp +++ b/eeschema/libfield.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include void LIB_EDIT_FRAME::EditField( LIB_FIELD* aField )