Commit abdf5f4d1c95774d6b0f4376ff3a104e88e90cce
1 parent
0dba500c
Exists in
master
Fix to make inv3 run in windows with wxpython4
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
app.py
@@ -80,7 +80,7 @@ USER_LOG_DIR = os.path.join(USER_INV_DIR, u'logs') | @@ -80,7 +80,7 @@ USER_LOG_DIR = os.path.join(USER_INV_DIR, u'logs') | ||
80 | 80 | ||
81 | # ------------------------------------------------------------------ | 81 | # ------------------------------------------------------------------ |
82 | 82 | ||
83 | -if sys.platform == 'linux2': | 83 | +if sys.platform in ('linux2', 'win32'): |
84 | try: | 84 | try: |
85 | tmp_var = wx.GetXDisplay | 85 | tmp_var = wx.GetXDisplay |
86 | except AttributeError: | 86 | except AttributeError: |
invesalius/gui/import_network_panel.py
@@ -674,7 +674,10 @@ class NodesPanel(wx.Panel): | @@ -674,7 +674,10 @@ class NodesPanel(wx.Panel): | ||
674 | self.tree_node.SetColumnWidth(4, 80) | 674 | self.tree_node.SetColumnWidth(4, 80) |
675 | 675 | ||
676 | self.hosts[0] = [True, "localhost", "", "invesalius"] | 676 | self.hosts[0] = [True, "localhost", "", "invesalius"] |
677 | - index = self.tree_node.InsertStringItem(sys.maxsize, "") | 677 | + try: |
678 | + index = self.tree_node.InsertStringItem(sys.maxsize, "") | ||
679 | + except OverflowError: | ||
680 | + index = self.tree_node.InsertStringItem(sys.maxint, "") | ||
678 | self.tree_node.SetStringItem(index, 1, "localhost") | 681 | self.tree_node.SetStringItem(index, 1, "localhost") |
679 | self.tree_node.SetStringItem(index, 2, "") | 682 | self.tree_node.SetStringItem(index, 2, "") |
680 | self.tree_node.SetStringItem(index, 3, "invesalius") | 683 | self.tree_node.SetStringItem(index, 3, "invesalius") |