From 4bb77bcbce96d240c4bcffdd8dd953e1c34d3ef6 Mon Sep 17 00:00:00 2001 From: moguno Date: Sun, 12 Oct 2014 13:52:54 +0900 Subject: [PATCH] =?UTF-8?q?HierarchyChild=E3=81=A8HierarchyParent=E3=81=AE?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=AF=E3=83=AB=E3=83=BC=E3=83=89=E9=A0=86?= =?UTF-8?q?=E5=BA=8F=E3=81=AB=E3=82=88=E3=81=A3=E3=81=A6active=5Fclass=5Fo?= =?UTF-8?q?f()=E3=81=8C=E5=AD=90=E3=82=A6=E3=82=A3=E3=82=B8=E3=82=A8?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=82=92=E8=A6=8B=E3=81=A4=E3=81=91=E3=82=89?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=8F=E3=81=AA=E3=82=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/plugin/gui/hierarchy_child.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/plugin/gui/hierarchy_child.rb b/core/plugin/gui/hierarchy_child.rb index 95df48b..5c5ccfa 100644 --- a/core/plugin/gui/hierarchy_child.rb +++ b/core/plugin/gui/hierarchy_child.rb @@ -26,7 +26,10 @@ module Plugin::GUI::HierarchyChild self end def active_class_of(klass) - self if is_a? klass end + if self.class.include?(Plugin::GUI::HierarchyParent) + super klass + else + self if is_a? klass end end # 先祖のうち、 _klass_ と is_a? 関係にあるものを返す # ==== Args -- 2.1.2