Browse Source

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
6.0.7
Roberto Fernandez Bautista 5 years ago
committed by Jeff Young
parent
commit
a743e0c52b
  1. 4
      pcbnew/tools/zone_filler_tool.cpp

4
pcbnew/tools/zone_filler_tool.cpp

@ -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();

Loading…
Cancel
Save