aboutsummaryrefslogtreecommitdiff
path: root/midi_inspector_nk.c
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-04 15:13:55 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-04 15:13:55 +0200
commit6b6a7d06ba18d8d2777797f2274b35bc576ef2a0 (patch)
tree085a354ed62c330970d337b3a8f85a8579d5b8a1 /midi_inspector_nk.c
parent88fdedc539bacb232652871d9beffa272fb94592 (diff)
downloadsherlock.lv2-6b6a7d06ba18d8d2777797f2274b35bc576ef2a0.tar.xz
various fixes.
* patch messages sent on wrong port, etc.
Diffstat (limited to 'midi_inspector_nk.c')
-rw-r--r--midi_inspector_nk.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/midi_inspector_nk.c b/midi_inspector_nk.c
index b1f811b..11258ef 100644
--- a/midi_inspector_nk.c
+++ b/midi_inspector_nk.c
@@ -485,12 +485,26 @@ _midi_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat
nk_layout_row_dynamic(ctx, widget_h, 3);
{
- if(nk_checkbox_label(ctx, "overwrite", &handle->state.overwrite))
+ const int32_t state_overwrite = nk_check_label(ctx, "overwrite", handle->state.overwrite);
+ if(state_overwrite != handle->state.overwrite)
+ {
+ handle->state.overwrite = state_overwrite;
_toggle(handle, handle->urid.overwrite, handle->state.overwrite, true);
- if(nk_checkbox_label(ctx, "block", &handle->state.block))
+ }
+
+ const int32_t state_block = nk_check_label(ctx, "block", handle->state.block);
+ if(state_block != handle->state.block)
+ {
+ handle->state.block = state_block;
_toggle(handle, handle->urid.block, handle->state.block, true);
- if(nk_checkbox_label(ctx, "follow", &handle->state.follow))
+ }
+
+ const int32_t state_follow = nk_check_label(ctx, "follow", handle->state.follow);
+ if(state_follow != handle->state.follow)
+ {
+ handle->state.follow = state_follow;
_toggle(handle, handle->urid.follow, handle->state.follow, true);
+ }
}
const bool max_reached = handle->n_item >= MAX_LINES;