Warn before replacing edited footprint in footprint editor.
Fixes: lp:1786570 * https://bugs.launchpad.net/kicad/+bug/1786570
This commit is contained in:
parent
c7d39d22db
commit
a45a8e8797
|
@ -98,6 +98,8 @@ bool FOOTPRINT_EDIT_FRAME::Clear_Pcb( bool aQuery )
|
||||||
|
|
||||||
if( aQuery && GetScreen()->IsModify() && !GetBoard()->IsEmpty() )
|
if( aQuery && GetScreen()->IsModify() && !GetBoard()->IsEmpty() )
|
||||||
{
|
{
|
||||||
|
wxSafeYield( this, true ); // Allow frame to come to front before showing warning.
|
||||||
|
|
||||||
if( !IsOK( this,
|
if( !IsOK( this,
|
||||||
_( "Current Footprint will be lost and this operation cannot be undone. Continue ?" ) ) )
|
_( "Current Footprint will be lost and this operation cannot be undone. Continue ?" ) ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -93,7 +93,8 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule )
|
||||||
|
|
||||||
SetCurItem( NULL );
|
SetCurItem( NULL );
|
||||||
|
|
||||||
Clear_Pcb( false );
|
if( !Clear_Pcb( true ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
GetBoard()->m_Status_Pcb = 0;
|
GetBoard()->m_Status_Pcb = 0;
|
||||||
newModule = new MODULE( *aModule );
|
newModule = new MODULE( *aModule );
|
||||||
|
|
Loading…
Reference in New Issue