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.
This commit is contained in:
John Emmas 2015-04-09 15:42:00 +01:00
parent 85e701880b
commit 2234fd4b8a

View File

@ -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;
}
}