wx fixes python3
authorGP Orcullo <kinsamanka@gmail.com>
Tue, 01 Nov 2022 14:23:47 +0800
branchpython3
changeset 3773 ab11852616b8
parent 3772 ec2babbd5698
child 3774 5a3c5dc888cc
wx fixes
controls/DebugVariablePanel/DebugVariableGraphicViewer.py
--- a/controls/DebugVariablePanel/DebugVariableGraphicViewer.py	Tue Nov 01 14:21:16 2022 +0800
+++ b/controls/DebugVariablePanel/DebugVariableGraphicViewer.py	Tue Nov 01 14:23:47 2022 +0800
@@ -480,7 +480,7 @@
         @param item: Item from which data to export, all items if None
         (default None)
         """
-        if item and item.GetData():
+        if item is not None and item.GetData():
             self.ParentWindow.CopyDataToClipboard(
                 [(item, [entry for entry in item.GetData()])
                  for item in (self.Items
@@ -582,7 +582,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:
+            if data is not None and len(data) > 0:
                 cursor_tick = data[numpy.argmin(
                     numpy.abs(data[:, 0] - event.xdata)), 0]