From 60dbda9dd2b402054e712b493cf9ba40c9031d7f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 19 May 2021 17:27:56 +0200 Subject: [PATCH] Pcbnew: try to fix an issue about frame title. for Pcbnew, this issue (see bug 8404) is only seen on OSX. So I am blindly trying to add to Pcbnew a fix made for Eeschema. --- pcbnew/files.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 3fd5381eb0..ca8f415c6a 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -1140,6 +1140,8 @@ bool PCB_EDIT_FRAME::doAutoSave() { wxFileName tmpFileName; + wxString title = GetTitle(); // Save frame title, that can be modified by the save process + if( GetBoard()->GetFileName().IsEmpty() ) { tmpFileName = wxFileName( PATHS::GetDefaultUserProjectsPath(), wxT( "noname" ), @@ -1184,11 +1186,15 @@ bool PCB_EDIT_FRAME::doAutoSave() GetSettingsManager()->TriggerBackupIfNeeded( NULL_REPORTER::GetInstance() ); } + SetTitle( title ); // Restore initial frame title + return true; } GetBoard()->SetFileName( tmpFileName.GetFullPath() ); + SetTitle( title ); // Restore initial frame title + return false; }