comparison view/Pane.cpp @ 1352:4949061fcb8c zoom

Debug tweaks
author Chris Cannam
date Fri, 05 Oct 2018 09:59:41 +0100
parents 97c68bffbda6
children 40b9a495a0e0
comparison
equal deleted inserted replaced
1349:615eb28768ca 1352:4949061fcb8c
211 haveConstraint = true; 211 haveConstraint = true;
212 break; 212 break;
213 } 213 }
214 } 214 }
215 215
216 SVCERR << "haveConstraint = " << haveConstraint << endl;
217
216 if (haveConstraint) { 218 if (haveConstraint) {
217 while (true) { 219 while (true) {
218 //!!! this won't terminate if level is in the PixelsPerFrame zone 220 //!!! this won't terminate if level is in the PixelsPerFrame zone
219 if (getZoomLevel() == level) current = count; 221 if (getZoomLevel() == level) current = count;
220 ZoomLevel newLevel = getZoomConstraintLevel(level.incremented(), 222 ZoomLevel newLevel = getZoomConstraintLevel(level.incremented(),
221 ZoomConstraint::RoundUp); 223 ZoomConstraint::RoundUp);
224 SVCERR << "newLevel = " << newLevel << endl;
222 if (newLevel == level) break; 225 if (newLevel == level) break;
223 level = newLevel; 226 level = newLevel;
224 if (++count == 50) break; 227 if (++count == 50) break;
225 } 228 }
226 } else { 229 } else {
238 step = 1; 241 step = 1;
239 while (pwr > 0) { 242 while (pwr > 0) {
240 step *= 2; 243 step *= 2;
241 --pwr; 244 --pwr;
242 } 245 }
243 // cerr << level << endl; 246 cerr << level.level << ", step " << step << endl;
244 level.level += step; 247 level.level += step;
245 if (++count == 100 || level.level > 262144) break; 248 if (++count == 100 || level.level > 262144) break;
246 } 249 }
247 } 250 }
248 251