# HG changeset patch # User laurent # Date 1251370060 -7200 # Node ID 37f870528def66d1353cd86b37d99909afcc3deb # Parent 5c0f34a9ab00dacdd0f27bd33f6f0544e1a46023 Close PLC editing and PLC debugging frames while closing project diff -r 5c0f34a9ab00 -r 37f870528def Beremiz.py --- a/Beremiz.py Fri Aug 14 16:26:19 2009 +0200 +++ b/Beremiz.py Thu Aug 27 12:47:40 2009 +0200 @@ -1305,6 +1305,7 @@ elif answer == wx.ID_CANCEL: return self.PluginInfos = {} + self.PluginRoot.CloseProject() self.PluginRoot = None self.Log.flush() self.RefreshAll() diff -r 5c0f34a9ab00 -r 37f870528def plugger.py --- a/plugger.py Fri Aug 14 16:26:19 2009 +0200 +++ b/plugger.py Thu Aug 27 12:47:40 2009 +0200 @@ -870,6 +870,13 @@ if result: self.logger.write_error(result) + def CloseProject(self): + if self.PLCEditor is not None: + self.PLCEditor.Close() + if self.PLCDebug is not None: + self.PLCDebug.Close() + + # Update PLCOpenEditor Plugin Block types from loaded plugins def RefreshPluginsBlockLists(self): if getattr(self, "PluggedChilds", None) is not None: