Use existing pcb filename for Save As where possible
This commit is contained in:
parent
518c1df81b
commit
28222d3bd0
|
@ -315,8 +315,15 @@ bool PCB_EDIT_FRAME::Files_io_from_id( int id )
|
||||||
case ID_COPY_BOARD_AS:
|
case ID_COPY_BOARD_AS:
|
||||||
case ID_SAVE_BOARD_AS:
|
case ID_SAVE_BOARD_AS:
|
||||||
{
|
{
|
||||||
|
wxString orig_name;
|
||||||
|
wxFileName::SplitPath( GetBoard()->GetFileName(),
|
||||||
|
nullptr, nullptr, &orig_name, nullptr );
|
||||||
|
|
||||||
|
if( orig_name.IsEmpty() )
|
||||||
|
orig_name = _( "noname" );
|
||||||
|
|
||||||
wxString pro_dir = wxPathOnly( Prj().GetProjectFullName() );
|
wxString pro_dir = wxPathOnly( Prj().GetProjectFullName() );
|
||||||
wxFileName fn( pro_dir, _( "noname" ), KiCadPcbFileExtension );
|
wxFileName fn( pro_dir, orig_name, KiCadPcbFileExtension );
|
||||||
wxString filename = fn.GetFullPath();
|
wxString filename = fn.GetFullPath();
|
||||||
|
|
||||||
if( AskSaveBoardFileName( this, &filename ) )
|
if( AskSaveBoardFileName( this, &filename ) )
|
||||||
|
|
Loading…
Reference in New Issue