From 4802ca76f81530652d0856cbcbd7f6acce8a81b6 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 26 Apr 2011 15:55:46 +0400 Subject: [PATCH] Proper fix which will work for several modules with different names --- gui/builtinViews/fittingView.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index 28ea81658..7e66ceb75 100644 --- a/gui/builtinViews/fittingView.py +++ b/gui/builtinViews/fittingView.py @@ -353,13 +353,13 @@ class FittingView(d.Display): srcContext = "fittingModule" itemContext = sMkt.getCategoryByItem(mod.item).name fullContext = (srcContext, itemContext) - if not fullContext in contexts: + if not srcContext in tuple(fCtxt[0] for fCtxt in contexts): contexts.append(fullContext) if mod.charge is not None: srcContext = "fittingCharge" itemContext = sMkt.getCategoryByItem(mod.charge).name fullContext = (srcContext, itemContext) - if not fullContext in contexts: + if not srcContext in tuple(fCtxt[0] for fCtxt in contexts): contexts.append(fullContext) selection.append(mod)