Put up infobar when editing board footprint.

Fixes https://gitlab.com/kicad/code/kicad/issues/5294
This commit is contained in:
Jeff Young 2020-08-21 23:44:43 +01:00
parent e92f58bb4f
commit d71d127c1a
2 changed files with 22 additions and 0 deletions

View File

@ -593,6 +593,18 @@ void LIB_EDIT_FRAME::SetCurPart( LIB_PART* aPart )
// Ensure synchronized pin edit can be enabled only symbols with interchangeable units
m_SyncPinEdit = aPart && aPart->IsRoot() && aPart->IsMulti() && !aPart->UnitsLocked();
/* TODO: enable when we have schematic-symbol editing...
if( IsCurrentPartFromSchematic() )
{
wxString msg;
msg.Printf( _( "Editing %s from schematic. Saving will update the schematic only." ),
partName );
GetInfoBar()->RemoveAllButtons();
GetInfoBar()->ShowMessage( msg, wxICON_INFORMATION );
}
*/
m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD );
RebuildView();
}

View File

@ -406,6 +406,16 @@ void FOOTPRINT_EDIT_FRAME::AddModuleToBoard( MODULE* aFootprint )
PCB_BASE_EDIT_FRAME::AddModuleToBoard( aFootprint );
if( IsCurrentFPFromBoard() )
{
wxString msg;
msg.Printf( _( "Editing %s from board. Saving will update the board only." ),
aFootprint->GetReference() );
GetInfoBar()->RemoveAllButtons();
GetInfoBar()->ShowMessage( msg, wxICON_INFORMATION );
}
UpdateMsgPanel();
}