--- a/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Fri Oct 28 18:54:33 2022 +0800
+++ b/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Fri Oct 28 18:59:04 2022 +0800
@@ -489,11 +489,12 @@
@param item: Item from which data to export, all items if None
- self.ParentWindow.CopyDataToClipboard(
- [(item, [entry for entry in item.GetData()])
- for item in (self.Items
+ if item and item.GetData(): + self.ParentWindow.CopyDataToClipboard( + [(item, [entry for entry in item.GetData()]) + for item in (self.Items def OnZoomFitButton(self):
@@ -590,7 +591,7 @@
# Search for point that tick is the nearest from mouse X position
# and set cursor tick to the tick of this point
+ if data and len(data) > 0: cursor_tick = data[numpy.argmin(
numpy.abs(data[:, 0] - event.xdata)), 0]
--- a/controls/DebugVariablePanel/DebugVariableTextViewer.py Fri Oct 28 18:54:33 2022 +0800
+++ b/controls/DebugVariablePanel/DebugVariableTextViewer.py Fri Oct 28 18:59:04 2022 +0800
@@ -122,6 +122,8 @@
Function called when mouse is leave Drop Target
--- a/controls/DebugVariablePanel/DebugVariableViewer.py Fri Oct 28 18:54:33 2022 +0800
+++ b/controls/DebugVariablePanel/DebugVariableViewer.py Fri Oct 28 18:59:04 2022 +0800
@@ -150,7 +150,7 @@
Function that unsubscribe and remove every item that store values of
a variable that doesn't exist in PLC anymore
- for item in list(self.ItemsDict.values())[:]:
+ for item in self.ItemsDict.values(): iec_path = item.GetVariable()
# Check that variablepath exist in PLC
--- a/controls/VariablePanel.py Fri Oct 28 18:54:33 2022 +0800
+++ b/controls/VariablePanel.py Fri Oct 28 18:59:04 2022 +0800
@@ -424,6 +424,8 @@
def ShowMessage(self, message):
message = wx.MessageDialog(self.ParentWindow, message, _("Error"), wx.OK | wx.ICON_ERROR)