From 106dcee278f780280d167cfb25a87a383e1fd4ee Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 31 Mar 2012 14:40:49 +0200 Subject: roi: Render only if selected width and height != 0 --- roi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roi.c b/roi.c index 3033d0a..1fac018 100644 --- a/roi.c +++ b/roi.c @@ -198,7 +198,9 @@ button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer userdata roi->roi_area.height = -roi->roi_area.height; } - do_roi(roi); + if (roi->roi_area.width != 0 && + roi->roi_area.height != 0) + do_roi(roi); roi->previous_draw.width = roi->previous_draw.height = 0; gtk_widget_queue_draw(roi->drawing_area); -- cgit