[dasher] Fix control mode



commit abfb9798cbd023286235390fa4a0fe2e399d6dbe
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Sat Mar 9 12:37:57 2013 +0000

    Fix control mode
    
    Thanks to Norbert Schmidt for the report
    https://bugzilla.gnome.org/show_bug.cgi?id=695353

 Src/DasherCore/AlphabetManager.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/Src/DasherCore/AlphabetManager.cpp b/Src/DasherCore/AlphabetManager.cpp
index 03b6aa3..a0f8ef3 100644
--- a/Src/DasherCore/AlphabetManager.cpp
+++ b/Src/DasherCore/AlphabetManager.cpp
@@ -549,7 +549,7 @@ void CAlphabetManager::IterateChildGroups(CAlphNode *pParent, const SGroupInfo *
   DASHER_ASSERT((*pCProb)[0] == 0);
   const int iMin(pParentGroup->iStart);
   const int iMax(pParentGroup->iEnd);
-  unsigned int iRange(((*pCProb)[iMax-1] - (*pCProb)[iMin-1]));
+  unsigned int iRange(pParentGroup == m_pBaseGroup ? CDasherModel::NORMALIZATION : ((*pCProb)[iMax-1] - 
(*pCProb)[iMin-1]));
 
   // TODO: Think through alphabet file formats etc. to make this class easier.
   // TODO: Throw a warning if parent node already has children
@@ -586,7 +586,7 @@ void CAlphabetManager::IterateChildGroups(CAlphNode *pParent, const SGroupInfo *
     pNewChild->Reparent(pParent, iLbnd, iHbnd);
   }
 
-  if (!pParentGroup) m_pNCManager->AddExtras(pParent);
+  if (pParentGroup == m_pBaseGroup) m_pNCManager->AddExtras(pParent);
   pParent->SetFlag(NF_ALLCHILDREN, true);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]