Fix bug in LPCBeremiz marking any newly opened project as modified
authorlaurent
Tue, 19 Apr 2011 15:28:35 +0200
changeset 597 6fbfd3bf2927
parent 596 b36422acae13
child 598 6c919bc1551d
Fix bug in LPCBeremiz marking any newly opened project as modified
LPCBeremiz.py
--- a/LPCBeremiz.py	Tue Apr 19 11:52:49 2011 +0200
+++ b/LPCBeremiz.py	Tue Apr 19 15:28:35 2011 +0200
@@ -1218,12 +1218,14 @@
         
         def SetProjectProperties(self, projectname, productname, productversion, companyname):
             properties = self.PluginRoot.GetProjectProperties()
-            properties["projectName"] = projectname
-            properties["productName"] = productname
-            properties["productVersion"] = productversion
-            properties["companyName"] = companyname
-            self.PluginRoot.SetProjectProperties(properties=properties)
-            self.RestartTimer()
+            new_properties = properties.copy()
+            new_properties["projectName"] = projectname
+            new_properties["productName"] = productname
+            new_properties["productVersion"] = productversion
+            new_properties["companyName"] = companyname
+            if new_properties != properties:
+                self.PluginRoot.SetProjectProperties(properties=new_properties)
+                self.RestartTimer()
         
         def SetOnlineMode(self, mode, path=None):
             self.PluginRoot.SetOnlineMode(mode, path)