From e7a9750f072abdd43a4c80d4edced78256c3b245 Mon Sep 17 00:00:00 2001 From: John Melton G0ORX Date: Fri, 24 Jul 2020 09:51:37 +0100 Subject: [PATCH] Fix panadapter freeze when zoom/pan changes as result of active receiver changing --- zoompan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zoompan.c b/zoompan.c index 77fbc6e..400f480 100644 --- a/zoompan.c +++ b/zoompan.c @@ -51,12 +51,16 @@ static GdkRGBA gray; int zoompan_active_receiver_changed(void *data) { if(display_zoompan) { g_mutex_lock(&pan_zoom_mutex); + g_signal_handler_block(G_OBJECT(zoom_scale),zoom_signal_id); + g_signal_handler_block(G_OBJECT(pan_scale),pan_signal_id); gtk_range_set_value(GTK_RANGE(zoom_scale),active_receiver->zoom); gtk_range_set_range(GTK_RANGE(pan_scale),0.0,(double)(active_receiver->zoom==1?active_receiver->pixels:active_receiver->pixels-active_receiver->width)); gtk_range_set_value (GTK_RANGE(pan_scale),active_receiver->pan); if(active_receiver->zoom == 1) { gtk_widget_set_sensitive(pan_scale, FALSE); } + g_signal_handler_unblock(G_OBJECT(pan_scale),pan_signal_id); + g_signal_handler_unblock(G_OBJECT(zoom_scale),zoom_signal_id); g_mutex_unlock(&pan_zoom_mutex); } return FALSE; -- 2.45.2