[dasher] Fix setting alternate colours
- From: Patrick Welche <pwelche src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [dasher] Fix setting alternate colours
 
- Date: Thu, 16 Feb 2012 12:54:59 +0000 (UTC)
 
commit 5c7b3f60da6b40087869bb457a783b7b8c746ffb
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Thu Feb 16 12:52:04 2012 +0000
    Fix setting alternate colours
    
    Colours for letter nodes are in the range 10-109 and their
    alternates in 140-239.
    Fixes core dump using Blissymbolics reported by Ross Summerfield.
 Src/DasherCore/AlphabetManager.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/Src/DasherCore/AlphabetManager.cpp b/Src/DasherCore/AlphabetManager.cpp
index 8f6acd5..03b6aa3 100644
--- a/Src/DasherCore/AlphabetManager.cpp
+++ b/Src/DasherCore/AlphabetManager.cpp
@@ -266,7 +266,8 @@ int CAlphabetManager::GetColour(symbol sym, int iOffset) const {
       iColour = (sym % 3) + 10;
 
   // Loop on low colours for nodes (TODO: go back to colour namespaces?)
-  if((iOffset&1) == 0 && iColour < 130)
+  // letters 10-109, alternate colours 140-239
+  if((iOffset&1) == 0 && iColour < 110)
     iColour += 130;
 
   return iColour;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]