2012 def RefreshPouInstanceVariablesPanel(self): |
2019 def RefreshPouInstanceVariablesPanel(self): |
2013 self.PouInstanceVariablesPanel.RefreshView() |
2020 self.PouInstanceVariablesPanel.RefreshView() |
2014 |
2021 |
2015 def OpenDebugViewer(self, instance_category, instance_path, instance_type): |
2022 def OpenDebugViewer(self, instance_category, instance_path, instance_type): |
2016 openedidx = self.IsOpened(instance_path) |
2023 openedidx = self.IsOpened(instance_path) |
|
2024 new_window = None |
2017 if openedidx is not None: |
2025 if openedidx is not None: |
2018 old_selected = self.TabsOpened.GetSelection() |
2026 old_selected = self.TabsOpened.GetSelection() |
2019 if old_selected != openedidx: |
2027 if old_selected != openedidx: |
2020 if old_selected >= 0: |
2028 if old_selected >= 0: |
2021 self.TabsOpened.GetPage(old_selected).ResetBuffer() |
2029 self.TabsOpened.GetPage(old_selected).ResetBuffer() |
2022 self.TabsOpened.SetSelection(openedidx) |
2030 self.TabsOpened.SetSelection(openedidx) |
2023 |
2031 |
2024 elif instance_category in ITEMS_VARIABLE: |
2032 elif instance_category in ITEMS_VARIABLE: |
2025 if self.Controler.IsNumType(instance_type, True): |
2033 if self.Controler.IsNumType(instance_type, True): |
2026 new_window = GraphicViewer(self.TabsOpened, self, self.Controler, instance_path) |
2034 if USE_MPL: |
2027 icon = GetBitmap("GRAPH") |
2035 self.AddDebugVariable(instance_path, True) |
|
2036 else: |
|
2037 new_window = GraphicViewer(self.TabsOpened, self, self.Controler, instance_path) |
|
2038 icon = GetBitmap("GRAPH") |
2028 |
2039 |
2029 else: |
2040 else: |
2030 bodytype = self.Controler.GetEditedElementBodyType(instance_type, True) |
2041 bodytype = self.Controler.GetEditedElementBodyType(instance_type, True) |
2031 new_window = None |
|
2032 if bodytype == "FBD": |
2042 if bodytype == "FBD": |
2033 new_window = Viewer(self.TabsOpened, instance_type, self, self.Controler, True, instance_path) |
2043 new_window = Viewer(self.TabsOpened, instance_type, self, self.Controler, True, instance_path) |
2034 new_window.RefreshScaling(False) |
2044 new_window.RefreshScaling(False) |
2035 elif bodytype == "LD": |
2045 elif bodytype == "LD": |
2036 new_window = LD_Viewer(self.TabsOpened, instance_type, self, self.Controler, True, instance_path) |
2046 new_window = LD_Viewer(self.TabsOpened, instance_type, self, self.Controler, True, instance_path) |