summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-10 11:02:33 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-10 11:02:33 -0800
commit0ae16899defc383eaedacf20f5ba03719d1e9322 (patch)
tree8dbac988f51d2842d71c8d66adfbcb5fde140624 /gtk-gui.c
parent7cf1960336011b8ef702c3bc2458b27db0fc1a4e (diff)
downloadsubsurface-0ae16899defc383eaedacf20f5ba03719d1e9322.tar.gz
Don't draw tooltips if no profile is displayed
This fixes ticket 33 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 842a28740..a2681de0f 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -1302,6 +1302,10 @@ static gboolean profile_tooltip (GtkWidget *widget, gint x, gint y,
if (tx < 0 || ty < 0)
return FALSE;
+ /* don't draw a tooltip if nothing is there */
+ if (gc->pi.nr == 0)
+ return FALSE;
+
width = drawing_area->width - 2*drawing_area->x;
height = drawing_area->height - 2*drawing_area->y;
if (width <= 0 || height <= 0)