Commit 3f15b9c0 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Eeschema: Fix issue in Search/ReplaceAll

Pcbnew: fix a very minor issue.
parent e420623f
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -756,7 +756,7 @@ bool LIB_COMPONENT::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
    if( ( p = strtok( NULL, " \t\n" ) ) != NULL  && *p == 'P' )
    if( ( p = strtok( NULL, " \t\n" ) ) != NULL  && *p == 'P' )
        m_options = ENTRY_POWER;
        m_options = ENTRY_POWER;


    /* Read next lines */
    // Read next lines, until "ENDDEF" is found
    while( aLineReader.ReadLine() )
    while( aLineReader.ReadLine() )
    {
    {
        line = aLineReader.Line();
        line = aLineReader.Line();
@@ -766,11 +766,14 @@ bool LIB_COMPONENT::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
        /* This is the error flag ( if an error occurs, Res = FALSE) */
        /* This is the error flag ( if an error occurs, Res = FALSE) */
        Res = true;
        Res = true;


        if( *line == '#' )      // a comment
            continue;

        if( (*line == 'T') && (*(line + 1) == 'i') )
        if( (*line == 'T') && (*(line + 1) == 'i') )
            Res = LoadDateAndTime( aLineReader );
            Res = LoadDateAndTime( aLineReader );
        else if( *line == 'F' )
        else if( *line == 'F' )
            Res = LoadField( aLineReader, Msg );
            Res = LoadField( aLineReader, Msg );
        else if( strcmp( p, "ENDDEF" ) == 0 )
        else if( strcmp( p, "ENDDEF" ) == 0 )   // End of component description
            break;
            break;
        else if( strcmp( p, "DRAW" ) == 0 )
        else if( strcmp( p, "DRAW" ) == 0 )
            Res = LoadDrawEntries( aLineReader, Msg );
            Res = LoadDrawEntries( aLineReader, Msg );
+661 −2

File changed.

Preview size limit exceeded, changes collapsed.

+2 −3
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep  8 2010)
// C++ code generated with wxFormBuilder (version Jun 30 2011)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -117,14 +117,13 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
	
	
	rightSizer->Add( m_buttonReplaceAll, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
	rightSizer->Add( m_buttonReplaceAll, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
	
	
	m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
	rightSizer->Add( m_buttonCancel, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 6 );
	rightSizer->Add( m_buttonCancel, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 6 );
	
	
	mainSizer->Add( rightSizer, 0, wxALL|wxEXPAND, 6 );
	mainSizer->Add( rightSizer, 0, wxALL|wxEXPAND, 6 );
	
	
	this->SetSizer( mainSizer );
	this->SetSizer( mainSizer );
	this->Layout();
	this->Layout();
	mainSizer->Fit( this );
	
	
	this->Centre( wxBOTH );
	this->Centre( wxBOTH );
	
	
+7 −6
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep  8 2010)
// C++ code generated with wxFormBuilder (version Jun 30 2011)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////


#ifndef __dialog_schematic_find_base__
#ifndef __DIALOG_SCHEMATIC_FIND_BASE_H__
#define __dialog_schematic_find_base__
#define __DIALOG_SCHEMATIC_FIND_BASE_H__


#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/intl.h>

#include <wx/string.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/gdicmn.h>
@@ -69,9 +70,9 @@ class DIALOG_SCH_FIND_BASE : public wxDialog
	
	
	public:
	public:
		
		
		DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
		DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 334,225 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
		~DIALOG_SCH_FIND_BASE();
		~DIALOG_SCH_FIND_BASE();
	
	
};
};


#endif //__dialog_schematic_find_base__
#endif //__DIALOG_SCHEMATIC_FIND_BASE_H__
+3 −3
Original line number Original line Diff line number Diff line
@@ -403,6 +403,7 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )


    if( m_foundItems.ReplaceItem() )
    if( m_foundItems.ReplaceItem() )
    {
    {
        OnModify();
        SaveUndoItemInUndoList( undoItem );
        SaveUndoItemInUndoList( undoItem );
        RedrawScreen( data.GetPosition(), warpCursor );
        RedrawScreen( data.GetPosition(), warpCursor );
    }
    }
@@ -411,9 +412,7 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )


    if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL )
    if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL )
    {
    {
        item = (SCH_ITEM*) m_foundItems.GetItem( data );
        while( ( item = (SCH_ITEM*) m_foundItems.GetItem( data ) ) != NULL )

        while( item != NULL )
        {
        {
            wxLogTrace( traceFindReplace, wxT( "Replacing %s with %s in item %s" ),
            wxLogTrace( traceFindReplace, wxT( "Replacing %s with %s in item %s" ),
                        GetChars( aEvent.GetFindString() ), GetChars( aEvent.GetReplaceString() ),
                        GetChars( aEvent.GetFindString() ), GetChars( aEvent.GetReplaceString() ),
@@ -429,6 +428,7 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )


            if( m_foundItems.ReplaceItem() )
            if( m_foundItems.ReplaceItem() )
            {
            {
                OnModify();
                SaveUndoItemInUndoList( undoItem );
                SaveUndoItemInUndoList( undoItem );
                RedrawScreen( data.GetPosition(), warpCursor );
                RedrawScreen( data.GetPosition(), warpCursor );
            }
            }
Loading