+ explicitlyDisabled = TRUE;
+ }
+ }
+
+ // Indeterminate overrides the others, and
+ // makes the item active.
+ items.Clear();
+ if (!indeterminateIf.IsEmpty())
+ {
+ StringToItems(GetDocument()->GetTopItem(), indeterminateIf, items);
+ int enabledCount = 0;
+ int inContextCount = 0;
+
+ for ( wxNode* node = items.GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
+
+ if (inActiveContext && otherItem->IsInActiveContext())
+ {
+ if (otherItem->IsEnabled())
+ {
+ enabledCount ++;
+ }
+ inContextCount ++;
+ }
+ }
+ if (inContextCount > 0 && enabledCount > 0)
+ {
+ active = TRUE;
+ explicitlyEnabled = FALSE;
+ explicitlyDisabled = FALSE;