From e267815bc83c3f81267341059b0f43c5f642134b Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Wed, 10 Oct 2012 00:45:39 +0200 Subject: [PATCH] factory: dont register twice a class with the same name. --- kivy/factory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kivy/factory.py b/kivy/factory.py index c7ef953ec..2ea9eff90 100644 --- a/kivy/factory.py +++ b/kivy/factory.py @@ -59,6 +59,8 @@ class FactoryBase(object): ''' if cls is None and module is None: raise ValueError('You must specify either cls= or module=') + if classname in self.classes: + return self.classes[classname] = { 'module': module, 'cls': cls,