* Fix if statement in ClipView * Move controllers.begin() to be the first argument It was the second argument, which means it could've returned negatives for random access iterators.
This commit is contained in:
@@ -559,7 +559,7 @@ DataFile ClipView::createClipDataFiles(
|
||||
// Add extra metadata needed for calculations later
|
||||
|
||||
const auto initialTrackIt = std::find(tc->tracks().begin(), tc->tracks().end(), t);
|
||||
if (initialTrackIt != tc->tracks().end())
|
||||
if (initialTrackIt == tc->tracks().end())
|
||||
{
|
||||
printf("Failed to find selected track in the TrackContainer.\n");
|
||||
return dataFile;
|
||||
|
||||
@@ -263,7 +263,7 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent,
|
||||
|
||||
if (it != controllers.end())
|
||||
{
|
||||
int idx = std::distance(it, controllers.begin());
|
||||
int idx = std::distance(controllers.begin(), it);
|
||||
m_userGroupBox->model()->setValue( true );
|
||||
m_userController->model()->setValue( idx );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user