From 5e4240ea795c992635a3cfc464d760205e07bf05 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 17 Aug 2021 08:54:45 -0400 Subject: Updated keys --- src/ui.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui.cc') diff --git a/src/ui.cc b/src/ui.cc index 3d0e193..82e874d 100644 --- a/src/ui.cc +++ b/src/ui.cc @@ -10,7 +10,7 @@ namespace frontend { struct ui_impl { std::shared_ptr pb; std::shared_ptr llr; - bool play = true; + bool play = false; bool stalePrintout = true; }; @@ -25,8 +25,8 @@ namespace frontend { data->stalePrintout = true; if(keycode >= 48 && keycode <= 57) { // Number -> label std::size_t num = keycode - 48; - if(num < data->llr->getLabels().size()) { - data->llr->applyLabel(data->llr->getLabels()[num], data->pb->getTime()); + if(num <= data->llr->getLabels().size()) { + data->llr->applyLabel(data->llr->getLabels()[num-1], data->pb->getTime()); } } else { switch(keycode) { @@ -78,7 +78,7 @@ namespace frontend { std::cout << "Annotations:" << std::endl; int num = 0; for(auto ann : data->llr->getLabels()) { - std::cout << num++ << ": " << ann << std::endl; + std::cout << ++num << ": " << ann << std::endl; } // Get window size struct winsize size; -- cgit v1.2.3