Commit 52b8819f67a30add3069f0befa46b2040ae70219
1 parent
00952d8a
Exists in
master
and in
67 other branches
FIX: Fixed incompatibility version from wxPython with agwStyle
Showing
1 changed file
with
8 additions
and
2 deletions
Show diff stats
invesalius/gui/preferences.py
@@ -8,9 +8,10 @@ ID = wx.NewId() | @@ -8,9 +8,10 @@ ID = wx.NewId() | ||
8 | 8 | ||
9 | try: | 9 | try: |
10 | from agw import flatnotebook as fnb | 10 | from agw import flatnotebook as fnb |
11 | + AGW = 1 | ||
11 | except ImportError: # if it's not there locally, try the wxPython lib. | 12 | except ImportError: # if it's not there locally, try the wxPython lib. |
12 | import wx.lib.agw.flatnotebook as fnb | 13 | import wx.lib.agw.flatnotebook as fnb |
13 | - | 14 | + AGW = 0 |
14 | 15 | ||
15 | class Preferences(wx.Dialog): | 16 | class Preferences(wx.Dialog): |
16 | 17 | ||
@@ -26,7 +27,12 @@ class Preferences(wx.Dialog): | @@ -26,7 +27,12 @@ class Preferences(wx.Dialog): | ||
26 | sizer = wx.BoxSizer(wx.VERTICAL) | 27 | sizer = wx.BoxSizer(wx.VERTICAL) |
27 | 28 | ||
28 | bookStyle = fnb.FNB_NODRAG | fnb.FNB_NO_NAV_BUTTONS | fnb.FNB_NO_X_BUTTON | 29 | bookStyle = fnb.FNB_NODRAG | fnb.FNB_NO_NAV_BUTTONS | fnb.FNB_NO_X_BUTTON |
29 | - self.book = fnb.FlatNotebook(self, wx.ID_ANY, agwStyle=bookStyle) | 30 | + |
31 | + if AGW: | ||
32 | + self.book = fnb.FlatNotebook(self, wx.ID_ANY, agwStyle=bookStyle) | ||
33 | + else: | ||
34 | + self.book = fnb.FlatNotebook(self, wx.ID_ANY, style=bookStyle) | ||
35 | + | ||
30 | sizer.Add(self.book, 80, wx.EXPAND|wx.ALL) | 36 | sizer.Add(self.book, 80, wx.EXPAND|wx.ALL) |
31 | 37 | ||
32 | self.pnl_viewer3d = Viewer3D(self) | 38 | self.pnl_viewer3d = Viewer3D(self) |