Mercurial > hg > svcore
comparison base/View.cpp @ 21:5da86cc182bd
* Add natty segmentation display to time-value layer. Need to do the same
for time-instants layer.
* Make sure dense 3D model bin names are saved and restored properly.
* Fix to chromagram normalization
author | Chris Cannam |
---|---|
date | Thu, 02 Feb 2006 17:31:08 +0000 |
parents | 742e6882e187 |
children | a1a6acb7cd37 |
comparison
equal
deleted
inserted
replaced
20:742e6882e187 | 21:5da86cc182bd |
---|---|
514 bool visible = (getXForFrame(m_playPointerFrame) != getXForFrame(f)); | 514 bool visible = (getXForFrame(m_playPointerFrame) != getXForFrame(f)); |
515 size_t oldPlayPointerFrame = m_playPointerFrame; | 515 size_t oldPlayPointerFrame = m_playPointerFrame; |
516 m_playPointerFrame = f; | 516 m_playPointerFrame = f; |
517 if (!visible) return; | 517 if (!visible) return; |
518 | 518 |
519 if (QApplication::keyboardModifiers() != Qt::NoModifier) { | 519 bool modifierPressed = // we only care about these ones |
520 std::cerr << "View::viewManagerPlaybackFrameChanged: modifiers == " | 520 ((QApplication::keyboardModifiers() & Qt::ShiftModifier) || |
521 << QApplication::keyboardModifiers() | 521 (QApplication::keyboardModifiers() & Qt::ControlModifier)); |
522 << std::endl; | |
523 } | |
524 | 522 |
525 switch (m_followPlay) { | 523 switch (m_followPlay) { |
526 | 524 |
527 case PlaybackScrollContinuous: | 525 case PlaybackScrollContinuous: |
528 if (QApplication::mouseButtons() == Qt::NoButton && | 526 if (QApplication::mouseButtons() == Qt::NoButton && |
529 QApplication::keyboardModifiers() == Qt::NoModifier) { | 527 !modifierPressed) { |
530 setCentreFrame(f, false); | 528 setCentreFrame(f, false); |
531 } | 529 } |
532 break; | 530 break; |
533 | 531 |
534 case PlaybackScrollPage: | 532 case PlaybackScrollPage: |
566 std::cerr << "xnew = " << xnew << ", width = " << width() << std::endl; | 564 std::cerr << "xnew = " << xnew << ", width = " << width() << std::endl; |
567 #endif | 565 #endif |
568 | 566 |
569 if (xnew < width()/8 || xnew > (width()*7)/8) { | 567 if (xnew < width()/8 || xnew > (width()*7)/8) { |
570 if (QApplication::mouseButtons() == Qt::NoButton && | 568 if (QApplication::mouseButtons() == Qt::NoButton && |
571 QApplication::keyboardModifiers() == Qt::NoModifier) { | 569 !modifierPressed) { |
572 long offset = getFrameForX(width()/2) - getStartFrame(); | 570 long offset = getFrameForX(width()/2) - getStartFrame(); |
573 long newCentre = sf + offset; | 571 long newCentre = sf + offset; |
574 bool changed = setCentreFrame(newCentre, false); | 572 bool changed = setCentreFrame(newCentre, false); |
575 if (changed) { | 573 if (changed) { |
576 xold = getXForFrame(oldPlayPointerFrame); | 574 xold = getXForFrame(oldPlayPointerFrame); |