comparison layer/TimeValueLayer.cpp @ 860:4a5d144bd5d0 tonioni

Merge from default branch
author Chris Cannam
date Tue, 09 Sep 2014 16:36:21 +0100
parents 6c6e34b09688
children 33157c3f0e80
comparison
equal deleted inserted replaced
842:8432d2551fb2 860:4a5d144bd5d0
731 float epsilon = 0.0001; 731 float epsilon = 0.0001;
732 732
733 i = close.begin(); 733 i = close.begin();
734 734
735 // Scan through the close points first, then the more distant ones 735 // Scan through the close points first, then the more distant ones
736 // if no suitable close one is found 736 // if no suitable close one is found. So the while-termination
737 // condition here can only happen once i has passed through the
738 // whole of the close container and then the whole of the separate
739 // points container. The two iterators are totally distinct, but
740 // have the same type so we cheekily use the same variable and a
741 // single loop for both.
737 742
738 while (i != points.end()) { 743 while (i != points.end()) {
739 744
740 if (i == close.end()) { 745 if (!distant) {
741 i = points.begin(); 746 if (i == close.end()) {
742 distant = true; 747 // switch from the close container to the points container
748 i = points.begin();
749 distant = true;
750 }
743 } 751 }
744 752
745 if (snap == SnapRight) { 753 if (snap == SnapRight) {
746 754
747 if (i->frame > matchframe && 755 if (i->frame > matchframe &&
1786 bool ok = false; 1794 bool ok = false;
1787 QString selected = ListInputDialog::getItem 1795 QString selected = ListInputDialog::getItem
1788 (0, tr("Choose value calculation"), 1796 (0, tr("Choose value calculation"),
1789 text, options, prevSelection, &ok); 1797 text, options, prevSelection, &ok);
1790 1798
1791 if (!ok) return false; 1799 if (!ok) {
1800 delete command;
1801 return false;
1802 }
1792 int selection = 0; 1803 int selection = 0;
1793 generation = Labeller::ValueNone; 1804 generation = Labeller::ValueNone;
1794 1805
1795 for (QStringList::const_iterator i = options.begin(); 1806 for (QStringList::const_iterator i = options.begin();
1796 i != options.end(); ++i) { 1807 i != options.end(); ++i) {