From 52b8819f67a30add3069f0befa46b2040ae70219 Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Wed, 21 Mar 2012 11:29:19 +0000 Subject: [PATCH] FIX: Fixed incompatibility version from wxPython with agwStyle --- invesalius/gui/preferences.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/invesalius/gui/preferences.py b/invesalius/gui/preferences.py index 25840f5..d713088 100644 --- a/invesalius/gui/preferences.py +++ b/invesalius/gui/preferences.py @@ -8,9 +8,10 @@ ID = wx.NewId() try: from agw import flatnotebook as fnb + AGW = 1 except ImportError: # if it's not there locally, try the wxPython lib. import wx.lib.agw.flatnotebook as fnb - + AGW = 0 class Preferences(wx.Dialog): @@ -26,7 +27,12 @@ class Preferences(wx.Dialog): sizer = wx.BoxSizer(wx.VERTICAL) bookStyle = fnb.FNB_NODRAG | fnb.FNB_NO_NAV_BUTTONS | fnb.FNB_NO_X_BUTTON - self.book = fnb.FlatNotebook(self, wx.ID_ANY, agwStyle=bookStyle) + + if AGW: + self.book = fnb.FlatNotebook(self, wx.ID_ANY, agwStyle=bookStyle) + else: + self.book = fnb.FlatNotebook(self, wx.ID_ANY, style=bookStyle) + sizer.Add(self.book, 80, wx.EXPAND|wx.ALL) self.pnl_viewer3d = Viewer3D(self) -- libgit2 0.21.2