From 9ca3f632a2928903fa44dbbc514704c76dcc9c66 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 26 Sep 2017 10:13:21 -0400 Subject: [PATCH] Pcbnew: fix update schematic from PCB file name bug. Use ctor wxFileName( path, name, extension) to create full schematic file name in update PCB from schematic code path. This prevents file names with dots '.' from being interpreted as the extension when using the wxFileName assignment operator. --- pcbnew/pcbframe.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index c0b7f0fb14..0f956c3c40 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2013-2016 Wayne Stambaugh + * Copyright (C) 2013 Wayne Stambaugh * Copyright (C) 2013-2017 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -1181,18 +1181,16 @@ void PCB_EDIT_FRAME::OnUpdatePCBFromSch( wxCommandEvent& event ) { if( Kiface().IsSingle() ) { - DisplayError( this, _( "Cannot update the PCB, because the Kicad is" - " opened in stand-alone mode. In order to create/update" - " PCBs from schematics, you need to launch Kicad shell" - " and create a PCB project." ) ); + DisplayError( this, _( "Cannot update the PCB, because the Kicad is " + "opened in stand-alone mode. In order to create or update " + "PCBs from schematics, you need to launch the Kicad shell " + "and create a PCB project." ) ); return; } else { KIWAY_PLAYER* frame = Kiway().Player( FRAME_SCH, true ); - wxFileName schfn = Prj().AbsolutePath( Prj().GetProjectName() ); - - schfn.SetExt( SchematicFileExtension ); + wxFileName schfn( Prj().GetProjectPath(), Prj().GetProjectName(), SchematicFileExtension ); if( !frame->IsVisible() ) {