Mercurial > hg > svgui
comparison layer/SingleColourLayer.cpp @ 297:860f9ada4327
...
author | Chris Cannam |
---|---|
date | Tue, 14 Aug 2007 19:37:10 +0000 |
parents | ea37c229a578 |
children | 5c59c433b358 |
comparison
equal
deleted
inserted
replaced
296:ea37c229a578 | 297:860f9ada4327 |
---|---|
139 } | 139 } |
140 // We don't want to call this if !v because that probably | 140 // We don't want to call this if !v because that probably |
141 // means we're being called from the constructor, and this is | 141 // means we're being called from the constructor, and this is |
142 // a virtual function | 142 // a virtual function |
143 hint = getDefaultColourHint(dark, impose); | 143 hint = getDefaultColourHint(dark, impose); |
144 std::cerr << "hint = " << hint << ", impose = " << impose << std::endl; | 144 // std::cerr << "hint = " << hint << ", impose = " << impose << std::endl; |
145 } else { | 145 } else { |
146 std::cerr << "(from ctor)" << std::endl; | 146 // std::cerr << "(from ctor)" << std::endl; |
147 } | 147 } |
148 | 148 |
149 if (hint >= 0 && impose) { | 149 if (hint >= 0 && impose) { |
150 setBaseColour(hint); | 150 setBaseColour(hint); |
151 return; | 151 return; |
162 int count = 0; | 162 int count = 0; |
163 if (m_colourRefCount.find(index) != m_colourRefCount.end()) { | 163 if (m_colourRefCount.find(index) != m_colourRefCount.end()) { |
164 count = m_colourRefCount[index]; | 164 count = m_colourRefCount[index]; |
165 } | 165 } |
166 | 166 |
167 std::cerr << "index = " << index << ", count = " << count; | 167 // std::cerr << "index = " << index << ", count = " << count; |
168 | 168 |
169 if (bestColour < 0 || count < bestCount) { | 169 if (bestColour < 0 || count < bestCount) { |
170 bestColour = index; | 170 bestColour = index; |
171 bestCount = count; | 171 bestCount = count; |
172 std::cerr << " *"; | 172 // std::cerr << " *"; |
173 } | 173 } |
174 | 174 |
175 std::cerr << std::endl; | 175 // std::cerr << std::endl; |
176 } | 176 } |
177 | 177 |
178 if (bestColour < 0) m_colour = 0; | 178 if (bestColour < 0) m_colour = 0; |
179 else m_colour = bestColour; | 179 else m_colour = bestColour; |
180 | 180 |