Eeschema: fix bug Bug #1197103 and an other very minor bug.

This commit is contained in:
jean-pierre charras 2013-07-03 09:27:52 +02:00
parent 9d6ec5a265
commit 26bd37e086
3 changed files with 32 additions and 3 deletions

View File

@ -3,6 +3,29 @@
* @brief Component annotation.
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-2013 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 <algorithm> // to use sort vector
#include <vector>
@ -13,7 +36,6 @@
#include <netlist.h>
#include <class_library.h>
#include <protos.h>
#include <sch_component.h>
#include <lib_pin.h>

View File

@ -161,10 +161,12 @@ bool EDA_APP::OnInit()
frame->Zoom_Automatique( true );
/* Load file specified in the command line. */
// Load file specified in the command line:
if( fileReady )
{
wxSetWorkingDirectory( filename.GetPath() );
if( !filename.GetPath().IsEmpty() )
// wxSetWorkingDirectory does not like empty paths
wxSetWorkingDirectory( filename.GetPath() );
if( frame->LoadOneEEProject( filename.GetFullPath(), false ) )
frame->GetCanvas()->Refresh( true );

View File

@ -734,6 +734,11 @@ void SCH_SCREEN::ClearAnnotation( SCH_SHEET_PATH* aSheetPath )
SCH_COMPONENT* component = (SCH_COMPONENT*) item;
component->ClearAnnotation( aSheetPath );
// Clear the modified component flag set by component->ClearAnnotation
// because we do not use it here and we should not leave this flag set,
// when an edition is finished:
component->ClearFlags();
}
}
}