summaryrefslogtreecommitdiff
path: root/meme
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2015-03-17 14:20:16 (GMT)
committerWerner Almesberger <werner@almesberger.net>2015-03-17 14:20:16 (GMT)
commitc49df231853634950b45d1bd97c2a89b58246c01 (patch)
tree99ae90e10e48a6c6c83215320153163ca51cc07e /meme
parentba5f4829bb7e66d427b20ee91493072daaeb25b0 (diff)
downloadmisc-c49df231853634950b45d1bd97c2a89b58246c01.zip
misc-c49df231853634950b45d1bd97c2a89b58246c01.tar.gz
misc-c49df231853634950b45d1bd97c2a89b58246c01.tar.bz2
meme/: N moves marker B to marker A (for sequential capture)
Diffstat (limited to 'meme')
-rw-r--r--meme/README2
-rw-r--r--meme/gui.c10
2 files changed, 12 insertions, 0 deletions
diff --git a/meme/README b/meme/README
index 6874ce6..d1b8b4d 100644
--- a/meme/README
+++ b/meme/README
@@ -29,6 +29,8 @@ Keyboard
- E: highlight equal height, see below
- G: toggle grid (edges) display
- M: toggle mesh display
+- N: cancel measurements and start new one at location of second measurement
+ point (or at cursor, if there was no second measurement)
- O: toggle overlay; see below
- P: toggle profiles display, see below
- Q: quit
diff --git a/meme/gui.c b/meme/gui.c
index e00f474..45ed8ad 100644
--- a/meme/gui.c
+++ b/meme/gui.c
@@ -885,6 +885,14 @@ static void clear_markers(void)
}
+static void marker_next(void)
+{
+ mark_a = mark_b ? mark_b : cursor;
+ mark_b = 0;
+ curr_mark = 0;
+}
+
+
/* ----- Overlay ----------------------------------------------------------- */
@@ -1243,6 +1251,8 @@ static bool event_loop(SDL_Surface **surf, const char *logfile,
return 0;
case SDLK_m:
show_mesh = !show_mesh;
+ case SDLK_n:
+ marker_next();
return 0;
case SDLK_o:
show_overlay = !show_overlay;