From abdf5f4d1c95774d6b0f4376ff3a104e88e90cce Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Mon, 14 May 2018 14:03:54 -0300 Subject: [PATCH] Fix to make inv3 run in windows with wxpython4 --- app.py | 2 +- invesalius/gui/import_network_panel.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index ca35bab..f9a1a6b 100644 --- a/app.py +++ b/app.py @@ -80,7 +80,7 @@ USER_LOG_DIR = os.path.join(USER_INV_DIR, u'logs') # ------------------------------------------------------------------ -if sys.platform == 'linux2': +if sys.platform in ('linux2', 'win32'): try: tmp_var = wx.GetXDisplay except AttributeError: diff --git a/invesalius/gui/import_network_panel.py b/invesalius/gui/import_network_panel.py index c4b9dab..034ecb9 100644 --- a/invesalius/gui/import_network_panel.py +++ b/invesalius/gui/import_network_panel.py @@ -674,7 +674,10 @@ class NodesPanel(wx.Panel): self.tree_node.SetColumnWidth(4, 80) self.hosts[0] = [True, "localhost", "", "invesalius"] - index = self.tree_node.InsertStringItem(sys.maxsize, "") + try: + index = self.tree_node.InsertStringItem(sys.maxsize, "") + except OverflowError: + index = self.tree_node.InsertStringItem(sys.maxint, "") self.tree_node.SetStringItem(index, 1, "localhost") self.tree_node.SetStringItem(index, 2, "") self.tree_node.SetStringItem(index, 3, "invesalius") -- libgit2 0.21.2