From aee45d9cce7859b6ec63ed31f4fca5730744761f Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 9 Jan 2017 15:10:06 -0500 Subject: [PATCH] Fix bogus error dialog when append-recording with no waves... But with at least one track of other type, such as Time --- src/toolbars/ControlToolBar.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/toolbars/ControlToolBar.cpp b/src/toolbars/ControlToolBar.cpp index 6db819e0a..8bf3e7bec 100644 --- a/src/toolbars/ControlToolBar.cpp +++ b/src/toolbars/ControlToolBar.cpp @@ -886,7 +886,16 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt) #ifdef EXPERIMENTAL_DA shifted = !shifted; #endif - if(it.First() == NULL) + bool hasWave = false; + for (auto t = it.First(); t; t = it.Next()) { + if (t->GetKind() == Track::Wave) { + hasWave = true; + break; + } + } + if(!hasWave) + // Treat append-record like record, when there was no given wave track + // to append onto. shifted = false; double t0 = p->GetSel0();