comparison view/Pane.cpp @ 1362:d79e21855aef

Add mechanism for saving/loading colour maps by name/id rather than by numerical index, for future compatibility when adding to or changing the supported colour maps. Add two new colour maps (and one old one). Write out backward-compatible numerical indices for use when reloading in older versions. Also add a mechanism to invert the colour map, though I don't think it turns out useful enough to include in the UI.
author Chris Cannam
date Thu, 18 Oct 2018 13:21:56 +0100
parents 93eaff6f206d
children bbeffb29bf09
comparison
equal deleted inserted replaced
1361:2e3b3fadba27 1362:d79e21855aef
109 Profiler profiler("Pane::updateHeadsUpDisplay"); 109 Profiler profiler("Pane::updateHeadsUpDisplay");
110 110
111 if (!isVisible()) return; 111 if (!isVisible()) return;
112 112
113 Layer *layer = 0; 113 Layer *layer = 0;
114 if (getLayerCount() > 0) layer = getLayer(getLayerCount() - 1); 114 if (getLayerCount() > 0) {
115 layer = getLayer(getLayerCount() - 1);
116 }
115 117
116 if (!m_headsUpDisplay) { 118 if (!m_headsUpDisplay) {
117 119
118 m_headsUpDisplay = new QFrame(this); 120 m_headsUpDisplay = new QFrame(this);
119 121
187 189
188 m_hthumb->setMinimumValue(1); 190 m_hthumb->setMinimumValue(1);
189 m_hthumb->setMaximumValue(count); 191 m_hthumb->setMaximumValue(count);
190 m_hthumb->setValue(count - current); 192 m_hthumb->setValue(count - current);
191 193
192 // cerr << "set value to " << count - 1 - current << endl;
193 // cerr << "default value is " << m_hthumb->getDefaultValue() << endl;
194
195 if (m_hthumb->getDefaultValue() == 0) { 194 if (m_hthumb->getDefaultValue() == 0) {
196 m_hthumb->setDefaultValue(count - current); 195 m_hthumb->setDefaultValue(count - current);
197 // cerr << "set default value to " << m_hthumb->getDefaultValue() << endl;
198 } 196 }
199 197
200 bool haveVThumb = false; 198 bool haveVThumb = false;
201 199
202 if (layer) { 200 if (layer) {