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 | 80 | |
81 | 81 | # ------------------------------------------------------------------ |
82 | 82 | |
83 | -if sys.platform == 'linux2': | |
83 | +if sys.platform in ('linux2', 'win32'): | |
84 | 84 | try: |
85 | 85 | tmp_var = wx.GetXDisplay |
86 | 86 | except AttributeError: | ... | ... |
invesalius/gui/import_network_panel.py
... | ... | @@ -674,7 +674,10 @@ class NodesPanel(wx.Panel): |
674 | 674 | self.tree_node.SetColumnWidth(4, 80) |
675 | 675 | |
676 | 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 | 681 | self.tree_node.SetStringItem(index, 1, "localhost") |
679 | 682 | self.tree_node.SetStringItem(index, 2, "") |
680 | 683 | self.tree_node.SetStringItem(index, 3, "invesalius") | ... | ... |