From 6e86d17108eb892e00d2c6123f57605fb93c71fd Mon Sep 17 00:00:00 2001 From: Chris Colbert Date: Thu, 9 Jan 2014 16:47:23 -0500 Subject: [PATCH] remove old use of size hint guard --- enaml/wx/wx_abstract_button.py | 3 +-- enaml/wx/wx_label.py | 3 +-- enaml/wx/wx_splitter.py | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/enaml/wx/wx_abstract_button.py b/enaml/wx/wx_abstract_button.py index 85599de50..ef077503c 100644 --- a/enaml/wx/wx_abstract_button.py +++ b/enaml/wx/wx_abstract_button.py @@ -9,7 +9,6 @@ from enaml.widgets.abstract_button import ProxyAbstractButton -from .wx_constraints_widget import size_hint_guard from .wx_control import WxControl @@ -87,7 +86,7 @@ def set_text(self, text, sh_guard=True): """ if sh_guard: - with size_hint_guard(self): + with self.size_hint_guard(): self.widget.SetLabel(text) else: self.widget.SetLabel(text) diff --git a/enaml/wx/wx_label.py b/enaml/wx/wx_label.py index 8b5fe30d9..dd9d3277b 100644 --- a/enaml/wx/wx_label.py +++ b/enaml/wx/wx_label.py @@ -11,7 +11,6 @@ from enaml.widgets.label import ProxyLabel -from .wx_constraints_widget import size_hint_guard from .wx_control import WxControl @@ -60,7 +59,7 @@ def set_text(self, text, sh_guard=True): """ if sh_guard: - with size_hint_guard(self): + with self.size_hint_guard(): self.widget.SetLabel(text) else: self.widget.SetLabel(text) diff --git a/enaml/wx/wx_splitter.py b/enaml/wx/wx_splitter.py index ff83ee79e..baf561b0e 100644 --- a/enaml/wx/wx_splitter.py +++ b/enaml/wx/wx_splitter.py @@ -12,7 +12,7 @@ from enaml.widgets.splitter import ProxySplitter -from .wx_constraints_widget import WxConstraintsWidget, size_hint_guard +from .wx_constraints_widget import WxConstraintsWidget from .wx_split_item import WxSplitItem @@ -257,7 +257,7 @@ def set_orientation(self, orientation, sh_guard=True): wx_orientation = _ORIENTATION_MAP[orientation] widget = self.widget if sh_guard: - with size_hint_guard(self): + with self.size_hint_guard(): widget.SetOrientation(wx_orientation) widget.SizeWindows() else: