changeset 331:d36040493434

core: fixed handling of classes with multiple inheritances in getAncestorWidget
author Goffi <goffi@goffi.org>
date Fri, 20 Dec 2019 12:29:37 +0100
parents bc977e3ff2aa
children 13bc00b9743a
files cagou/core/cagou_main.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cagou/core/cagou_main.py	Fri Dec 20 12:29:37 2019 +0100
+++ b/cagou/core/cagou_main.py	Fri Dec 20 12:29:37 2019 +0100
@@ -1010,6 +1010,6 @@
         @return (Widget, None): found instance or None
         """
         parent = wid.parent
-        while parent and parent.__class__ != cls:
+        while parent and not isinstance(parent, cls):
             parent = parent.parent
         return parent