Commit 26bd37e0 authored by jean-pierre charras's avatar jean-pierre charras

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

parent 9d6ec5a2
......@@ -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>
......
......@@ -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 );
......
......@@ -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();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment