Eeschema: Don't give a default filename to schematics in standalone

CHANGED: No longer call schematics noname.sch in standalone mode,
instead don't given them any name so the user can choose on save.

Fixes: lp:1852607
* https://bugs.launchpad.net/kicad/+bug/1852607
This commit is contained in:
Ian McInerney 2019-11-15 11:28:35 +00:00
parent 88e55bbf2d
commit 39ef514ff9
2 changed files with 3 additions and 7 deletions

View File

@ -233,8 +233,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
g_ConnectionGraph = new CONNECTION_GRAPH( this );
m_showBorderAndTitleBlock = true; // true to show sheet references
m_DefaultSchematicFileName = NAMELESS_PROJECT;
m_DefaultSchematicFileName += wxT( ".sch" );
m_showAllPins = false;
m_printMonochrome = true;
m_printSheetReference = true;
@ -435,7 +433,7 @@ void SCH_EDIT_FRAME::CreateScreens()
SetScreen( g_RootSheet->GetScreen() );
}
g_RootSheet->GetScreen()->SetFileName( m_DefaultSchematicFileName );
g_RootSheet->GetScreen()->SetFileName( wxEmptyString );
g_CurrentSheet->clear();
g_CurrentSheet->push_back( g_RootSheet );
@ -1002,10 +1000,9 @@ void SCH_EDIT_FRAME::UpdateTitle()
{
wxString title;
if( GetScreen()->GetFileName() == m_DefaultSchematicFileName )
if( GetScreen()->GetFileName().IsEmpty() )
{
title.Printf( _( "Eeschema" ) + wxT( " \u2014 %s" ),
GetScreen()->GetFileName() );
title.Printf( _( "Eeschema" ) + wxT( " \u2014" ) + _( " [no file]" ) );
}
else
{

View File

@ -107,7 +107,6 @@ enum SCH_CLEANUP_FLAGS {
class SCH_EDIT_FRAME : public SCH_BASE_FRAME
{
private:
wxString m_DefaultSchematicFileName;
wxString m_SelectedNetName;
PARAM_CFG_ARRAY m_projectFileParams;