From 3ac5fd634247ff596e59557b7a3924e5492c76c2 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 3 Feb 2021 19:11:02 -0500 Subject: [PATCH] Get rid of wx popups when opening a read-only project --- common/settings/json_settings.cpp | 3 +++ pcbnew/files.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/common/settings/json_settings.cpp b/common/settings/json_settings.cpp index dcdaa04711..a8bc2783be 100644 --- a/common/settings/json_settings.cpp +++ b/common/settings/json_settings.cpp @@ -131,6 +131,9 @@ bool JSON_SETTINGS::LoadFromFile( const wxString& aDirectory ) backed_up = true; } + // Silence popups if legacy file is read-only + wxLogNull doNotLog; + wxConfigBase::DontCreateOnDemand(); auto cfg = std::make_unique( wxT( "" ), wxT( "" ), aPath.GetFullPath() ); diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 11245a1f44..8469059882 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -595,6 +595,9 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in return false; } + // Get rid of any existing warnings about the old board + GetInfoBar()->Dismiss(); + // Loading a complex project and build data can be time // consuming, so display a busy cursor wxBusyCursor dummy;