Stop tooltip timeout when a canvas-widget or item is hidden.

This commit is contained in:
Robin Gareus 2017-04-17 01:45:25 +02:00
parent 976e03c15c
commit aff92a019d
2 changed files with 12 additions and 1 deletions

View file

@ -729,6 +729,15 @@ GtkCanvas::deliver_event (GdkEvent* event)
return false;
}
void
GtkCanvas::item_shown_or_hidden (Item* item)
{
if (item == current_tooltip_item) {
stop_tooltip_timeout ();
}
Canvas::item_shown_or_hidden (item);
}
/** Called when an item is being destroyed.
* @param item Item being destroyed.
* @param bounding_box Last known bounding box of the item.
@ -1136,6 +1145,7 @@ GtkCanvas::on_map ()
void
GtkCanvas::on_unmap ()
{
stop_tooltip_timeout ();
Gtk::EventBox::on_unmap();
#ifdef __APPLE__
if (_nsglview) {