From 77239591c0cc59785c40389a879322a84225e727 Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Wed, 22 Dec 2021 15:15:25 +0000
Subject: [PATCH] Don't commit zone refill if there were no changes.

Fixes https://gitlab.com/kicad/code/kicad/issues/10085
---
 pcbnew/zone_filler.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp
index ec66cb6c28..1d6ada3d65 100644
--- a/pcbnew/zone_filler.cpp
+++ b/pcbnew/zone_filler.cpp
@@ -422,6 +422,12 @@ bool ZONE_FILLER::Fill( std::vector<ZONE*>& aZones, bool aCheck, wxWindow* aPare
             if( dlg.ShowModal() == wxID_CANCEL )
                 return false;
         }
+        else
+        {
+            // No need to commit something that hasn't changed (and committing will set
+            // the modified flag).
+            return false;
+        }
     }
 
     if( m_progressReporter )