summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-31 14:40:49 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-31 14:40:49 +0200
commit106dcee278f780280d167cfb25a87a383e1fd4ee (patch)
tree71b81e0edcc3b25caa431101e42da17ea145a9de
parent80c4e624b4c4d4ac4e59da127db6778884f78487 (diff)
downloadcv-106dcee278f780280d167cfb25a87a383e1fd4ee.tar.gz
cv-106dcee278f780280d167cfb25a87a383e1fd4ee.tar.bz2
cv-106dcee278f780280d167cfb25a87a383e1fd4ee.zip
roi: Render only if selected width and height != 0
-rw-r--r--roi.c4
1 files changed, 3 insertions, 1 deletions
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);