aboutsummaryrefslogtreecommitdiff
path: root/src/ui.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-08-17 08:56:51 -0400
committerYour Name <you@example.com>2021-08-17 08:56:51 -0400
commit2a4ca022ad37ff2452ec3addb8c760a93bb616c6 (patch)
treedd66554b8e7e568a410974df71a95d37f5433d18 /src/ui.cc
parent8a6b5564c0fc37e6e556d04e17ddba86d4bd3dc1 (diff)
parent5e4240ea795c992635a3cfc464d760205e07bf05 (diff)
downloadannotator-2a4ca022ad37ff2452ec3addb8c760a93bb616c6.tar.gz
annotator-2a4ca022ad37ff2452ec3addb8c760a93bb616c6.tar.bz2
annotator-2a4ca022ad37ff2452ec3addb8c760a93bb616c6.zip
Merge branch 'master' of https://vance.fish/git/annotator
Diffstat (limited to 'src/ui.cc')
-rw-r--r--src/ui.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui.cc b/src/ui.cc
index 858d74c..f852bde 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -10,7 +10,7 @@ namespace frontend {
struct ui_impl {
std::shared_ptr<playback> pb;
std::shared_ptr<backend::labeller> 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) {
@@ -104,7 +104,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;