Add Zone fill to undo stack

Allows undoing zone filling and reverting to previous fill state.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7440
This commit is contained in:
Roberto Fernandez Bautista 2021-03-17 17:51:18 +00:00 committed by Jeff Young
parent 8efc2f12d8
commit a743e0c52b
1 changed files with 2 additions and 2 deletions

View File

@ -132,7 +132,7 @@ void ZONE_FILLER_TOOL::FillAllZones( wxWindow* aCaller, PROGRESS_REPORTER* aRepo
if( filler.Fill( toFill ) )
{
commit.Push( _( "Fill Zone(s)" ), false );
commit.Push( _( "Fill Zone(s)" ), true ); // Allow undoing zone fill
getEditFrame<PCB_EDIT_FRAME>()->m_ZoneFillsDirty = false;
}
else
@ -176,7 +176,7 @@ int ZONE_FILLER_TOOL::ZoneFill( const TOOL_EVENT& aEvent )
std::lock_guard<KISPINLOCK> lock( board()->GetConnectivity()->GetLock() );
if( filler.Fill( toFill ) )
commit.Push( _( "Fill Zone(s)" ), false );
commit.Push( _( "Fill Zone(s)" ), true ); // Allow undoing zone fill
else
commit.Revert();