From 2234fd4b8af2e2cbb28bbe41f35b334671aebcae Mon Sep 17 00:00:00 2001 From: John Emmas Date: Thu, 9 Apr 2015 15:42:00 +0100 Subject: [PATCH] Delete a canvas tooltip after we've finished with it All canvas objects share just one tooltip object which is based around Gtk::Label. The Label expands if the current tooltip text is wider than the previous text. However, it doesn't shrink again if the next tooltip has shorter text. Eventually, this results in some very strange looking tooltips (especially in Mixbus where they're used quite extensively). Deleting the object after use will force a new object to get generated next time (at the correct size). There's still only ever one object per canvas but it's no longer persistent. --- libs/canvas/canvas.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc index cc588cf3e1..11abd1a7d5 100644 --- a/libs/canvas/canvas.cc +++ b/libs/canvas/canvas.cc @@ -1211,6 +1211,11 @@ GtkCanvas::hide_tooltip () if (tooltip_window) { tooltip_window->hide (); + + // Delete the tooltip window so it'll get re-created + // (i.e. properly re-sized) on the next usage. + delete tooltip_window; + tooltip_window = NULL; } }