Get rid of save warning after Footprint Editor Save As.

Fixes https://gitlab.com/kicad/code/kicad/issues/8084
This commit is contained in:
Jeff Young 2021-04-01 11:17:02 +01:00
parent 94470bfa15
commit f6f31b7654
2 changed files with 8 additions and 0 deletions

View File

@ -467,6 +467,7 @@ void FOOTPRINT_EDIT_FRAME::AddFootprintToBoard( FOOTPRINT* aFootprint )
aFootprint->GetReference() );
GetInfoBar()->RemoveAllButtons();
GetInfoBar()->AddCloseButton();
GetInfoBar()->ShowMessage( msg, wxICON_INFORMATION );
}

View File

@ -31,6 +31,7 @@
#include <footprint_edit_frame.h>
#include <pcbnew_id.h>
#include <confirm.h>
#include <widgets/infobar.h>
#include <bitmaps.h>
#include <footprint.h>
#include <project.h>
@ -283,6 +284,12 @@ int FOOTPRINT_EDITOR_CONTROL::SaveAs( const TOOL_EVENT& aEvent )
view()->Update( footprint() );
m_frame->ClearModify();
// Get rid of the save-will-update-board-only (or any other dismissable warning)
WX_INFOBAR* infobar = m_frame->GetInfoBar();
if( infobar->IsShown() && infobar->HasCloseButton() )
infobar->Dismiss();
canvas()->ForceRefresh();
m_frame->SyncLibraryTree( true );
}