# HG changeset patch # User Laurent Bessard # Date 1355920324 -3600 # Node ID 3e78925125e19c871aecde557ff4414a952c3c94 # Parent 64aa66d481c5da07c9c48f0753002342fbde95b6 Fix bug main configuration variables not displayed in lower left panel when project root element is selected diff -r 64aa66d481c5 -r 3e78925125e1 Beremiz.py --- a/Beremiz.py Wed Dec 19 13:29:38 2012 +0100 +++ b/Beremiz.py Wed Dec 19 13:32:04 2012 +0100 @@ -1038,7 +1038,22 @@ del confnode self._Refresh(TITLE, FILEMENU, PROJECTTREE) dialog.Destroy() - + +#------------------------------------------------------------------------------- +# Highlights showing functions +#------------------------------------------------------------------------------- + + def ShowHighlight(self, infos, start, end, highlight_type): + config_name = self.Controler.GetProjectMainConfigurationName() + if config_name is not None and infos[0] == self.Controler.ComputeConfigurationName(config_name): + self.CTR._OpenView() + selected = self.TabsOpened.GetSelection() + if selected != -1: + viewer = self.TabsOpened.GetPage(selected) + viewer.AddHighlight(infos[1:], start, end, highlight_type) + else: + IDEFrame.ShowHighlight(self, infos, start, end, highlight_type) + #------------------------------------------------------------------------------- # Exception Handler #------------------------------------------------------------------------------- diff -r 64aa66d481c5 -r 3e78925125e1 controls/PouInstanceVariablesPanel.py --- a/controls/PouInstanceVariablesPanel.py Wed Dec 19 13:29:38 2012 +0100 +++ b/controls/PouInstanceVariablesPanel.py Wed Dec 19 13:32:04 2012 +0100 @@ -106,6 +106,10 @@ def SetPouType(self, tagname, pou_instance=None): self.PouTagName = tagname + if self.PouTagName == "Project": + config_name = self.Controller.GetProjectMainConfigurationName() + if config_name is not None: + self.PouTagName = self.Controller.ComputeConfigurationName(config_name) if pou_instance is not None: self.PouInstance = pou_instance