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:
parent
8efc2f12d8
commit
a743e0c52b
|
@ -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…
Reference in New Issue