diff cagou/core/cagou_main.py @ 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 5bd583d00594
children 89799148f894
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