comparison view/Pane.cpp @ 272:87e4c880b4c8

* highlight the nearest measurement rect * fix rewind during playback
author Chris Cannam
date Fri, 29 Jun 2007 13:58:08 +0000
parents 61a704654497
children b9380f679f70
comparison
equal deleted inserted replaced
271:1a49bd0d8375 272:87e4c880b4c8
452 m_mousePos.y() - m_clickPos.y()); 452 m_mousePos.y() - m_clickPos.y());
453 453
454 } 454 }
455 455
456 if (toolMode == ViewManager::MeasureMode && topLayer) { 456 if (toolMode == ViewManager::MeasureMode && topLayer) {
457 topLayer->paintMeasurementRects(this, paint); 457 bool showFocus = false;
458 if (!m_manager || !m_manager->isPlaying()) showFocus = true;
459 topLayer->paintMeasurementRects(this, paint, showFocus, m_identifyPoint);
458 } 460 }
459 461
460 if (selectionIsBeingEdited()) { 462 if (selectionIsBeingEdited()) {
461 drawEditingSelection(paint); 463 drawEditingSelection(paint);
462 } 464 }
1211 } 1213 }
1212 } 1214 }
1213 1215
1214 if (!m_manager->isPlaying()) { 1216 if (!m_manager->isPlaying()) {
1215 1217
1218 bool updating = false;
1219
1216 if (getSelectedLayer()) { 1220 if (getSelectedLayer()) {
1217 1221
1218 bool previouslyIdentifying = m_identifyFeatures; 1222 bool previouslyIdentifying = m_identifyFeatures;
1219 m_identifyFeatures = true; 1223 m_identifyFeatures = true;
1220 1224
1221 if (m_identifyFeatures != previouslyIdentifying || 1225 if (m_identifyFeatures != previouslyIdentifying ||
1222 m_identifyPoint != prevPoint) { 1226 m_identifyPoint != prevPoint) {
1227 update();
1228 updating = true;
1229 }
1230 }
1231
1232 if (!updating && mode == ViewManager::MeasureMode &&
1233 m_manager && !m_manager->isPlaying()) {
1234
1235 Layer *layer = getTopLayer();
1236 if (layer && layer->nearestMeasurementRectChanged
1237 (this, prevPoint, m_identifyPoint)) {
1223 update(); 1238 update();
1224 } 1239 }
1225 } 1240 }
1226 } 1241 }
1227 1242